Fix quoting in string comparisons
authorBryn M. Reeves <bmr@redhat.com>
Wed, 31 Oct 2012 20:02:01 +0000 (20:02 +0000)
committerBryn M. Reeves <bmr@redhat.com>
Wed, 31 Oct 2012 20:02:01 +0000 (20:02 +0000)
blkdevalias

index 6fade5a..9058235 100755 (executable)
@@ -43,7 +43,7 @@ print_wwid_mapping() {
 # store the WWID map to disk
 wm_store_wwid_map() {
     TMP_MAP=$(mktemp --tmpdir=$WM_CONF_DIR)
-    if [ ! -f $TMP_MAP ]; then
+    if [ ! -f "$TMP_MAP" ]; then
         error "could not write temporary file"
         exit 1
     fi
@@ -55,7 +55,7 @@ wm_store_wwid_map() {
 
 # read the WWID map from disk
 wm_load_wwid_map() {
-    if [ ! -f $WM_MAP_PATH ] || [ ! -r $WM_MAP_PATH  ]; then
+    if [ ! -f "$WM_MAP_PATH" ] || [ ! -r "$WM_MAP_PATH"  ]; then
         error "$WM_MAP_PATH does not exist or is not readable"
         exit 1
     fi
@@ -144,7 +144,7 @@ EOF
     debug "WM_GROUP=\"$WM_GROUP\""
     echo -n "Writing wwid map configuration: "
     TMP_CONF=$(mktemp --tmpdir=$WM_CONF_PATH)
-    if [ ! -f $TMP_CONF ]; then
+    if [ ! -f "$TMP_CONF" ]; then
         echo
         error "could not write temporary file"
         exit 1
@@ -202,7 +202,7 @@ wm_list_disks () {
 
 wm_querydisk () {
     local LISTDEV ONDEV WWID NNAME
-    if [ $1 == "-d" ]; then
+    if [ "$1" == "-d" ]; then
         LISTDEV=1
         shift
     fi