]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
Reset IFS variable
authorHannes Reinecke <hare@suse.de>
Fri, 26 Jun 2015 14:55:52 +0000 (16:55 +0200)
committerHarald Hoyer <harald@redhat.com>
Tue, 7 Jul 2015 11:44:24 +0000 (13:44 +0200)
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>
Signed-off-by: Thomas Renninger <trenn@suse.de>
modules.d/95fcoe/parse-fcoe.sh

index b66fa3ec1bcbac6515f7a5a6b54b22f7e6347a53..a2140072688d3d4eaac25ae2bb01af4c451e91e4 100755 (executable)
@@ -26,8 +26,10 @@ initqueue --onetime modprobe -b -q bnx2fc
 udevadm settle --timeout=30
 
 parse_fcoe_opts() {
+    local OLDIFS="$IFS"
     local IFS=:
     set $fcoe
+    IFS="$OLDIFS"
 
     case $# in
         2)