[lxc-devel] [PATCH] lxc-shutdown: fix lxc_path variable

Serge Hallyn serge.hallyn at ubuntu.com
Thu May 9 01:00:14 UTC 2013


Quoting Dwight Engen (dwight.engen at oracle.com):
> Signed-off-by: Dwight Engen <dwight.engen at oracle.com>

Thanks Dwight - yeah I've caught myself getting it wrong in other
places.

Acked-by: Serge E. Hallyn <serge.hallyn at ubuntu.com>

and applied/pushed.

> ---
>  src/lxc/lxc-shutdown.in | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/src/lxc/lxc-shutdown.in b/src/lxc/lxc-shutdown.in
> index 953ee6e..c81e736 100644
> --- a/src/lxc/lxc-shutdown.in
> +++ b/src/lxc/lxc-shutdown.in
> @@ -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
>  
> -- 
> 1.8.1.4
> 
> 
> ------------------------------------------------------------------------------
> Learn Graph Databases - Download FREE O'Reilly Book
> "Graph Databases" is the definitive new guide to graph databases and 
> their applications. This 200-page book is written by three acclaimed 
> leaders in the field. The early access version is available now. 
> Download your free book today! http://p.sf.net/sfu/neotech_d2d_may
> _______________________________________________
> Lxc-devel mailing list
> Lxc-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/lxc-devel




More information about the lxc-devel mailing list