65 lines
1.8 KiB
Diff
65 lines
1.8 KiB
Diff
|
From bcfdc4522d2f04d0a1fd46d80a8ac7ff357b8bc5 Mon Sep 17 00:00:00 2001
|
||
|
From: Hannes Reinecke <hare@suse.de>
|
||
|
Date: Mon, 14 Jul 2014 10:22:31 +0200
|
||
|
Subject: Reset IFS variable
|
||
|
|
||
|
Setting and unsetting the IFS variable is tricky. To be on the
|
||
|
safe side we should always reset the IFS variable to its original
|
||
|
value after parsing.
|
||
|
|
||
|
Signed-off-by: Hannes Reinecke <hare@suse.de>
|
||
|
---
|
||
|
modules.d/95dasd/parse-dasd.sh | 2 ++
|
||
|
modules.d/95fcoe/parse-fcoe.sh | 2 ++
|
||
|
modules.d/95zfcp/parse-zfcp.sh | 2 ++
|
||
|
3 files changed, 6 insertions(+)
|
||
|
|
||
|
diff --git a/modules.d/95dasd/parse-dasd.sh b/modules.d/95dasd/parse-dasd.sh
|
||
|
index aba720b..e0d4a9c 100755
|
||
|
--- a/modules.d/95dasd/parse-dasd.sh
|
||
|
+++ b/modules.d/95dasd/parse-dasd.sh
|
||
|
@@ -3,8 +3,10 @@
|
||
|
# ex: ts=8 sw=4 sts=4 et filetype=sh
|
||
|
for dasd_arg in $(getargs rd.dasd= -d rd_DASD= DASD=); do
|
||
|
(
|
||
|
+ local OLDIFS="$IFS"
|
||
|
local IFS=","
|
||
|
set -- $dasd_arg
|
||
|
+ IFS="$OLDIFS"
|
||
|
echo "$@" | normalize_dasd_arg >> /etc/dasd.conf
|
||
|
)
|
||
|
done
|
||
|
diff --git a/modules.d/95fcoe/parse-fcoe.sh b/modules.d/95fcoe/parse-fcoe.sh
|
||
|
index 8e08303..4ee13cb 100755
|
||
|
--- a/modules.d/95fcoe/parse-fcoe.sh
|
||
|
+++ b/modules.d/95fcoe/parse-fcoe.sh
|
||
|
@@ -28,8 +28,10 @@ modprobe bnx2fc >/dev/null 2>&1
|
||
|
udevadm settle --timeout=30
|
||
|
|
||
|
parse_fcoe_opts() {
|
||
|
+ local OLDIFS="$IFS"
|
||
|
local IFS=:
|
||
|
set $fcoe
|
||
|
+ IFS="$OLDIFS"
|
||
|
|
||
|
case $# in
|
||
|
2)
|
||
|
diff --git a/modules.d/95zfcp/parse-zfcp.sh b/modules.d/95zfcp/parse-zfcp.sh
|
||
|
index 1d21472..df29fb2 100755
|
||
|
--- a/modules.d/95zfcp/parse-zfcp.sh
|
||
|
+++ b/modules.d/95zfcp/parse-zfcp.sh
|
||
|
@@ -6,8 +6,10 @@ getargbool 1 rd.zfcp.conf -d -n rd_NO_ZFCPCONF || rm /etc/zfcp.conf
|
||
|
|
||
|
for zfcp_arg in $(getargs rd.zfcp -d 'rd_ZFCP='); do
|
||
|
(
|
||
|
+ local OLDIFS="$IFS"
|
||
|
local IFS=","
|
||
|
set $zfcp_arg
|
||
|
+ IFS="$OLDIFS"
|
||
|
echo "$@" >> /etc/zfcp.conf
|
||
|
)
|
||
|
done
|
||
|
--
|
||
|
1.8.4.5
|
||
|
|