]> 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>
Wed, 29 Jun 2016 09:41:21 +0000 (11:41 +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>
(cherry picked from commit b8efaa00171135db1e1f09a73a2e0d8098f03867)

modules.d/95fcoe/parse-fcoe.sh

index 7eca0b6c448d8038deaf9b18a86010b3a4371ce4..745a78c6c5ceb16e3b91fe948c0737526bccba25 100755 (executable)
@@ -31,8 +31,10 @@ udevadm settle --timeout=30
 [ -e /sys/bus/fcoe/ctlr_create ] || modprobe fcoe || die "FCoE requested but kernel/initrd does not support FCoE"
 
 parse_fcoe_opts() {
+    local OLDIFS="$IFS"
     local IFS=:
     set $fcoe
+    IFS="$OLDIFS"
 
     case $# in
         2)