CMDLINE handling: do not use 'local' outside a function
authorMichael Prokop <mika@grml.org>
Sun, 4 Nov 2012 11:14:13 +0000 (12:14 +0100)
committerMichael Prokop <mika@grml.org>
Sun, 4 Nov 2012 11:14:13 +0000 (12:14 +0100)
Reported by Dietmar Segbert <didi.segbert@arcor.de> on the
Grml user mailing list.

autoconfig.functions

index 2736153..0e962c5 100755 (executable)
@@ -42,9 +42,9 @@ if [ -z "$CMDLINE" ]; then
   [ -d /live/image/bootparams/ ] && CMDLINE="$CMDLINE $(cat /live/image/bootparams/* | tr '\n' ' ')"
   modprobe 9p 2>/dev/null || true
   if grep -q 9p /proc/filesystems ; then
   [ -d /live/image/bootparams/ ] && CMDLINE="$CMDLINE $(cat /live/image/bootparams/* | tr '\n' ' ')"
   modprobe 9p 2>/dev/null || true
   if grep -q 9p /proc/filesystems ; then
-      local TAG="grml-parameters"
+      TAG="grml-parameters"
       if grep -q "$TAG" /sys/bus/virtio/devices/*/mount_tag 2>/dev/null ; then
       if grep -q "$TAG" /sys/bus/virtio/devices/*/mount_tag 2>/dev/null ; then
-          local MOUNTDIR="$(mktemp -d)"
+          MOUNTDIR="$(mktemp -d)"
           mount -t 9p -o trans=virtio,ro "$TAG" "$MOUNTDIR"
           CMDLINE="$CMDLINE $(cat "$MOUNTDIR"/* 2>/dev/null | tr '\n' ' ')"
           umount "$MOUNTDIR"
           mount -t 9p -o trans=virtio,ro "$TAG" "$MOUNTDIR"
           CMDLINE="$CMDLINE $(cat "$MOUNTDIR"/* 2>/dev/null | tr '\n' ' ')"
           umount "$MOUNTDIR"