dracut/0500-Reset-IFS-variable.patch
Marcus Meissner 0f203926a1 Accepting request 422869 from home:hreinecke:branches:Base:System
- Rename patch:
  * From 0211-fix_multipath_check_hostonly.patch
    to 0303-fix_multipath_check_hostonly.patch
- Rename patch:
  * From 0213-10i18n-keymap-find.patch
    to 0213-Fix-wrong-keymap-inclusion.patch

- 95fcoe: Do not complain about missing /etc/hba.conf (bsc#980539)
  * Add 0215-95fcoe-Do-not-complain-about-missing-etc-hba.conf.patch
- 95fcoe: silence lldpad warnings
  * Add 0216-95fcoe-silence-lldpad-warnings.patch
- 95fcoe: Allow to specify the FCoE mode via the fcoe= parameter
  * Add 0217-95fcoe-Allow-to-specify-the-FCoE-mode-via-the-fcoe-p.patch
- 40network: allow persistent interface names (bsc#995284)
  * Add 0218-40network-allow-persistent-interface-names.patch
- 95fcoe: use interface names instead of MAC addresses
  * Add 0219-95fcoe-use-interface-names-instead-of-MAC-addresses.patch
- 95fcoe: always set AUTO_VLAN for fcoemon (bsc#995019)
  * Add 0220-95fcoe-always-set-AUTO_VLAN-for-fcoemon.patch
- 95fcoe: Add shutdown script (bsc#994860)
  * Add 0221-95fcoe-Add-shutdown-script.patch
- 90dm: Fixup shutdown script (bsc#994860)
  * Add 0222-90dm-Fixup-shutdown-script.patch
- 90dm: fixup dependency cycle between MD and DM shutdown (bsc#994860)
  * Add 0223-90dm-fixup-dependency-cycle-between-MD-and-DM-shutdo.patch
- 90multipath: Start daemon after udev settle (bsc#986734)
  * Add 0304-90multipath-Start-daemon-after-udev-settle.patch
- 90multipath: load dm_multipath module during startup
  * Add 0305-90multipath-load-dm_multipath-module-during-startup.patch
- 90multipath: add shutdown script (bsc#994860)

OBS-URL: https://build.opensuse.org/request/show/422869
OBS-URL: https://build.opensuse.org/package/show/Base:System/dracut?expand=0&rev=263
2016-09-01 11:57:40 +00:00

104 lines
3.1 KiB
Diff

From bcaa0a11b41765be7cbb92e2641750b5adb8e326 Mon Sep 17 00:00:00 2001
From: Hannes Reinecke <hare@suse.de>
Date: Mon, 14 Jul 2014 10:22:31 +0200
Subject: [PATCH] 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/95dasd_rules/parse-dasd.sh | 8 ++++++--
modules.d/95zfcp_rules/parse-zfcp.sh | 4 ++++
3 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/modules.d/95dasd/parse-dasd.sh b/modules.d/95dasd/parse-dasd.sh
index 35c997c..976bd03 100755
--- a/modules.d/95dasd/parse-dasd.sh
+++ b/modules.d/95dasd/parse-dasd.sh
@@ -1,8 +1,10 @@
#!/bin/sh
for dasd_arg in $(getargs rd.dasd= -d rd_DASD= DASD=); do
(
+ local OLDIFS="$IFS"
IFS=","
set -- $dasd_arg
+ IFS="$OLDIFS"
echo "$@" | normalize_dasd_arg >> /etc/dasd.conf
)
done
diff --git a/modules.d/95dasd_rules/parse-dasd.sh b/modules.d/95dasd_rules/parse-dasd.sh
index e1bee62..1cc621f 100755
--- a/modules.d/95dasd_rules/parse-dasd.sh
+++ b/modules.d/95dasd_rules/parse-dasd.sh
@@ -59,8 +59,10 @@ for dasd_arg in $(getargs root=) $(getargs resume=); do
;;
esac
if [ -n "$ccw_arg" ] ; then
+ OLDIFS="$IFS"
IFS="-"
set -- $ccw_arg
+ IFS="$OLDIFS"
create_udev_rule $2
fi
)
@@ -68,9 +70,10 @@ done
for dasd_arg in $(getargs rd.dasd=); do
(
+ OLDIFS="$IFS"
IFS=","
set -- $dasd_arg
- unset IFS
+ IFS="$OLDIFS"
while (($# > 0)); do
case $1 in
autodetect|probeonly)
@@ -78,13 +81,14 @@ for dasd_arg in $(getargs rd.dasd=); do
;;
*-*)
range=$1
+ OLDIFS="$IFS"
IFS="-"
set -- $range
start=${1#0.0.}
shift
end=${1#0.0.}
shift
- unset IFS
+ IFS="$OLDIFS"
for dev in $(seq $(( 16#$start )) $(( 16#$end )) ) ; do
create_udev_rule $(printf "0.0.%04x" "$dev")
done
diff --git a/modules.d/95zfcp_rules/parse-zfcp.sh b/modules.d/95zfcp_rules/parse-zfcp.sh
index 77412f7..7d47d35 100755
--- a/modules.d/95zfcp_rules/parse-zfcp.sh
+++ b/modules.d/95zfcp_rules/parse-zfcp.sh
@@ -53,8 +53,10 @@ fi
for zfcp_arg in $(getargs rd.zfcp); do
(
+ OLDIFS="$IFS"
IFS=","
set $zfcp_arg
+ IFS="$OLDIFS"
create_udev_rule $1 $2 $3
)
done
@@ -70,8 +72,10 @@ for zfcp_arg in $(getargs root=) $(getargs resume=); do
;;
esac
if [ -n "$ccw_arg" ] ; then
+ OLDIFS="$IFS"
IFS="-"
set -- $ccw_arg
+ IFS="$OLDIFS"
_wwpn=${4%:*}
_lun=${4#*:}
create_udev_rule $2 $wwpn $lun
--
2.6.6