1
0
multipath-tools/multipath-tools-quote-variable-in-mkinitrd-setup

27 lines
902 B
Plaintext
Raw Normal View History

commit 94ed8e8244e89700d702c54d8a791e190b3868df
Author: Hannes Reinecke <hare@suse.de>
Date: Mon Nov 24 10:46:36 2008 +0100
Properly quote variables in mkinitrd scripts
We should quote variables properly, otherwise we risk some script
syntax errors.
References: 447966
Signed-off-by: Hannes Reinecke <hare@suse.de>
diff --git a/multipath/setup-multipath.sh b/multipath/setup-multipath.sh
index 1670071..bb9b244 100644
--- a/multipath/setup-multipath.sh
+++ b/multipath/setup-multipath.sh
@@ -12,7 +12,7 @@ fi
if [ -x /sbin/multipath -a -x /sbin/dmsetup ] ; then
for bd in $blockdev ; do
update_blockdev $bd
- if [ $blockdriver = device-mapper ]; then
+ if [ "$blockdriver" = device-mapper ]; then
dm_uuid=$(dmsetup info -c --noheadings -o uuid -j $blockmajor -m $blockminor)
dm_creator=${dm_uuid%-*}
if [ "$dm_creator" = "mpath" ]; then