]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
lxc-shutdown: fix lxc_path variable
authorDwight Engen <dwight.engen@oracle.com>
Wed, 8 May 2013 20:44:10 +0000 (16:44 -0400)
committerSerge Hallyn <serge.hallyn@ubuntu.com>
Thu, 9 May 2013 00:58:57 +0000 (19:58 -0500)
Signed-off-by: Dwight Engen <dwight.engen@oracle.com>
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
src/lxc/lxc-shutdown.in

index 953ee6ecad6fb10f30d98033ebae085030387438..c81e736b65418850a112381afc0cf3f5944e7356 100644 (file)
@@ -41,7 +41,7 @@ alarm() {
 dolxcstop()
 {
     echo "Calling lxc-stop on $lxc_name"
-    lxc-stop -n $lxc_name -P "$lxcpath"
+    lxc-stop -n $lxc_name -P "$lxc_path"
     exit 0
 }
 
@@ -87,7 +87,7 @@ while [ $# -gt 0 ]; do
         ;;
     -P|--lxcpath)
         optarg_check $opt "$1"
-        lxcpath=$1
+        lxc_path=$1
         dowait=1
         shift
         ;;
@@ -113,8 +113,8 @@ if [ -z "$lxc_name" ]; then
     exit 1
 fi
 
-if [ ! -d "$lxcpath" ]; then
-    echo "$lxcpath: no such directory"
+if [ ! -d "$lxc_path" ]; then
+    echo "$lxc_path: no such directory"
     exit 1
 fi
 
@@ -126,7 +126,7 @@ fi
 which lxc-info > /dev/null 2>&1 || { echo "lxc-info not found."; exit 1; }
 which lxc-wait > /dev/null 2>&1 || { echo "lxc-wait not found."; exit 1; }
 
-pid=`lxc-info -n $lxc_name -P "$lxcpath" -p 2>/dev/null | awk '{ print $2 }'`
+pid=`lxc-info -n $lxc_name -P "$lxc_path" -p 2>/dev/null | awk '{ print $2 }'`
 if [ "$pid" = "-1" ]; then
     echo "$lxc_name is not running"
     exit 1
@@ -149,7 +149,7 @@ if [ $timeout != "-1" ]; then
     alarmpid=$!
 fi
 
-while ! lxc-info -n $lxc_name -P "$lxcpath" --state-is STOPPED; do
+while ! lxc-info -n $lxc_name -P "$lxc_path" --state-is STOPPED; do
     sleep 1
 done