  echo
  echo "--- Control groups ---"
  
- CGROUP_MNT_PATH=$(grep -m1 "^cgroup" /proc/self/mounts | awk '{ print $2 }')
+@@ -70,42 +73,34 @@ print_cgroups() {
+ 
+ CGROUP_MNT_PATH=`print_cgroups cgroup /proc/self/mounts | head -1`
  
 -echo -n "Cgroup: " && is_enabled CONFIG_CGROUPS yes
 +is_enabled "Cgroup: " CONFIG_CGROUPS yes

+SETCOLOR_WARNING () { printf '\033[1;33m'; }
+SETCOLOR_NORMAL  () { printf '\033[0;39m'; }
 
-is_set() {
-    $GREP -q "$1=[y|m]" $CONFIG
+is_set () {
+    $GREP -q "$1=[y|m]" "$CONFIG"
     return $?
 }
 
-is_enabled() {
-    mandatory=$2
+is_enabled () {
+    prefix=$1
+    option=$2
+    mandatory=$3

 #
 # lxc: linux Container library
diff -Naurp lxc.orig/src/lxc/lxc-destroy.in lxc/src/lxc/lxc-destroy.in
--- lxc.orig/src/lxc/lxc-destroy.in	2012-03-02 13:20:15.859239022 +0100
+++ lxc/src/lxc/lxc-destroy.in	2012-03-09 12:42:48.359136155 +0100
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
 
 #
 # lxc: linux Container library
@@ -98,7 +98,7 @@ fi
 # deletion of others later.
 rootdev=`grep lxc.rootfs $lxc_path/$lxc_name/config 2>/dev/null | sed -e 's/^[^/]*/\//'`
 if [ ! -z "$rootdev" ]; then
-	if [ -b "$rootdev" -o -h "$rootdev" ]; then
+	if [ -b "$rootdev" ] || [ -h "$rootdev" ]; then
 		lvdisplay $rootdev > /dev/null 2>&1
 		if [ $? -eq 0 ]; then
 			echo "removing backing store: $rootdev"
diff -Naurp lxc.orig/src/lxc/lxc-ls.in lxc/src/lxc/lxc-ls.in
--- lxc.orig/src/lxc/lxc-ls.in	2012-03-02 13:20:15.859239022 +0100
+++ lxc/src/lxc/lxc-ls.in	2012-03-09 12:41:35.350756130 +0100
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
 
 localstatedir=@LOCALSTATEDIR@
 lxcpath=@LXCPATH@
diff -Naurp lxc.orig/src/lxc/lxc-netstat.in lxc/src/lxc/lxc-netstat.in
--- lxc.orig/src/lxc/lxc-netstat.in	2012-03-02 13:20:15.859239022 +0100
+++ lxc/src/lxc/lxc-netstat.in	2012-03-09 12:41:35.354756455 +0100
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
 # set -ex
 
 usage() {
@@ -59,7 +59,7 @@ for i in "$cgroups"; do
     cgroup_name=$(echo $i | awk ' { print $1 } ')
     cgroup_path=$(echo $i | awk ' { print $3 } ')
 
