]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
lxc-create: do not use 'local'
authorNatanael Copa <ncopa@alpinelinux.org>
Mon, 26 Nov 2012 11:00:44 +0000 (12:00 +0100)
committerStéphane Graber <stgraber@ubuntu.com>
Mon, 26 Nov 2012 14:29:22 +0000 (09:29 -0500)
Apparently 'local' is not POSIX. Don't use it.

Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
src/lxc/lxc-create.in

index 26ec6a267c321802701cf77e21d4e98c43b2bb67..30f0c22d90a0f7ec3e3aeb5a80f64c91fce71f71 100644 (file)
@@ -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)