summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Horák <dan@danny.cz>2010-03-31 15:38:27 +0200
committerDan Horák <dan@danny.cz>2010-03-31 15:38:27 +0200
commita33811018a4e7cce2026610c5fa3938cf1ae09a1 (patch)
treead03a082ab4af82b7155c21bb386ff453185c179
parentf46dfd2339f7acbe35ce49da2cfe250a58731831 (diff)
downloadutils-a33811018a4e7cce2026610c5fa3938cf1ae09a1.tar.gz
utils-a33811018a4e7cce2026610c5fa3938cf1ae09a1.tar.xz
utils-a33811018a4e7cce2026610c5fa3938cf1ae09a1.zip
surround variables with double quotes
-rw-r--r--device_cio_free12
1 files changed, 6 insertions, 6 deletions
diff --git a/device_cio_free b/device_cio_free
index e7ffbc7..1c895b3 100644
--- a/device_cio_free
+++ b/device_cio_free
@@ -38,14 +38,14 @@ free_device()
[ -z "$1" ] && return
- DEV=$(echo $1 | tr "A-Z" "a-z")
+ DEV=$(echo "$1" | tr "A-Z" "a-z")
[ $VERBOSE ] && echo "Freeing device(s) $DEV"
if ! echo "free $DEV" > $BLACKLIST 2> /dev/null ; then
echo "Error: can't free device(s) $DEV"
else
if [ -z $ALL_DEVICES ]; then
- ALL_DEVICES=$DEV
+ ALL_DEVICES="$DEV"
else
ALL_DEVICES="$ALL_DEVICES,$DEV"
fi
@@ -59,8 +59,8 @@ wait_on_device()
[ -z "$1" ] && return
- DEV=$1
- DEVICE_ONLINE=/sys/bus/ccw/devices/$DEV/online
+ DEV="$1"
+ DEVICE_ONLINE="/sys/bus/ccw/devices/$DEV/online"
[ $VERBOSE ] && echo "Waiting on device $DEV"
[ -f "$DEVICE_ONLINE" ] && return
@@ -96,7 +96,7 @@ process_config_file()
free_device $1
;;
esac
- done < $CONFIG
+ done < "$CONFIG"
fi
}
@@ -184,7 +184,7 @@ if [ $MODE_ZNET ]; then
free_device $DEVICES
;;
esac
- done < $ZNETCONFIG
+ done < "$ZNETCONFIG"
fi
# process channels from network interface configurations
for line in $(grep -E -i -h "^[[:space:]]*SUBCHANNELS=['\"]?([0-9]\.[0-9]\.[a-f0-9]+,){1,2}([0-9]\.[0-9]\.[a-f0-9]+)['\"]?([[:space:]]+#|[[:space:]]*$)" /etc/sysconfig/network-scripts/ifcfg-* 2> /dev/null)