[lxc-devel] [PATCH] lxc-create: do not use 'local'

Stéphane Graber stgraber at ubuntu.com
Mon Nov 26 14:30:23 UTC 2012


On 11/26/2012 06:00 AM, Natanael Copa wrote:
> Apparently 'local' is not POSIX. Don't use it.
> 
> Signed-off-by: Natanael Copa <ncopa at alpinelinux.org>

Acked-by: Stéphane Graber <stgraber at ubuntu.com>

Applied to staging branch. Thanks.

> ---
>  src/lxc/lxc-create.in | 7 +++----
>  1 file changed, 3 insertions(+), 4 deletions(-)
> 
> diff --git a/src/lxc/lxc-create.in b/src/lxc/lxc-create.in
> index 26ec6a2..30f0c22 100644
> --- a/src/lxc/lxc-create.in
> +++ b/src/lxc/lxc-create.in
> @@ -68,9 +68,8 @@ usage_err() {
>  }
>  
>  optarg_check() {
> -    local opt="$1" optarg="$2"
> -    if [ -z "$optarg" ]; then
> -        usage_err "option '$opt' requires an argument"
> +    if [ -z "$2" ]; then
> +        usage_err "option '$1' requires an argument"
>      fi
>  }
>  
> @@ -84,7 +83,7 @@ vgname=lxc
>  custom_rootfs=""
>  
>  while [ $# -gt 0 ]; do
> -        local opt="$1"
> +        opt="$1"
>          shift
>          case "$opt" in
>  	    -h|--help)
> 


-- 
Stéphane Graber
Ubuntu developer
http://www.ubuntu.com

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 899 bytes
Desc: OpenPGP digital signature
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20121126/2ff99975/attachment.pgp>


More information about the lxc-devel mailing list