From: Harald Hoyer Date: Thu, 5 Sep 2013 07:57:48 +0000 (+0200) Subject: no more global $CMDLINE X-Git-Tag: 033~12 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8d3d72a68c8b1857ecf8b252e75f1e90adcc67a6;p=thirdparty%2Fdracut.git no more global $CMDLINE Do not use the global variable CMDLINE anymore. Use CMDLINE=$(getcmdline) --- diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh index 82c4f7234..5b629172a 100644 --- a/modules.d/40network/net-lib.sh +++ b/modules.d/40network/net-lib.sh @@ -250,8 +250,6 @@ ibft_to_cmdline() { echo $mac > /tmp/net.${dev}.has_ibft_config done ) >> /etc/cmdline.d/40-ibft.conf - # reread cmdline - unset CMDLINE } parse_iscsi_root() diff --git a/modules.d/80cms/cmsifup.sh b/modules.d/80cms/cmsifup.sh index c19f2c881..b36165048 100755 --- a/modules.d/80cms/cmsifup.sh +++ b/modules.d/80cms/cmsifup.sh @@ -32,7 +32,6 @@ fi echo "nameserver=$i" done } > /etc/cmdline.d/80-cms.conf -unset CMDLINE [ -e "/tmp/net.ifaces" ] && read IFACES < /tmp/net.ifaces IFACES="$IFACES $DEVICE" diff --git a/modules.d/90dmsquash-live/dmsquash-live-root.sh b/modules.d/90dmsquash-live/dmsquash-live-root.sh index 14e84e14b..8951f80cf 100755 --- a/modules.d/90dmsquash-live/dmsquash-live-root.sh +++ b/modules.d/90dmsquash-live/dmsquash-live-root.sh @@ -57,7 +57,7 @@ det_img_fs() { } modprobe squashfs - +CMDLINE=$(getcmdline) for arg in $CMDLINE; do case $arg in ro|rw) liverw=$arg ;; esac; done # mount the backing of the live image first mkdir -m 0755 -p /run/initramfs/live diff --git a/modules.d/90livenet/parse-livenet.sh b/modules.d/90livenet/parse-livenet.sh index 365eca192..6c847baab 100755 --- a/modules.d/90livenet/parse-livenet.sh +++ b/modules.d/90livenet/parse-livenet.sh @@ -11,7 +11,6 @@ if [ -n "$updates" ]; then # make sure network comes up even if we're doing a local live device if [ -z "$netroot" ]; then echo > /tmp/net.ifaces - unset CMDLINE fi echo "$updates" > /tmp/liveupdates.info echo '[ -e /tmp/liveupdates.done ]' > \ diff --git a/modules.d/99base/dracut-lib.sh b/modules.d/99base/dracut-lib.sh index ef8c5a3c0..74d7d3526 100755 --- a/modules.d/99base/dracut-lib.sh +++ b/modules.d/99base/dracut-lib.sh @@ -99,11 +99,12 @@ killall_proc_mountpoint() { done } -_getcmdline() { +getcmdline() { local _line local _i + local CMDLINE_ETC_D + local CMDLINE_ETC unset _line - unset CMDLINE_ETC CMDLINE_ETC_D if [ -e /etc/cmdline ]; then while read -r _line; do @@ -120,6 +121,7 @@ _getcmdline() { read -r CMDLINE