From: Harald Hoyer Date: Fri, 2 Mar 2012 13:25:57 +0000 (+0100) Subject: get rid of /tmp/root.info X-Git-Tag: 018~70 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2c0317213ebe3a6cd0f0db5fb5b7a3da0d42cdda;p=thirdparty%2Fdracut.git get rid of /tmp/root.info --- diff --git a/modules.d/40network/ifup.sh b/modules.d/40network/ifup.sh index b55362cc6..ffae15c1d 100755 --- a/modules.d/40network/ifup.sh +++ b/modules.d/40network/ifup.sh @@ -45,8 +45,6 @@ fi # bail immediately if the interface is already up # or we don't need the network [ -f "/tmp/net.$netif.up" ] && exit 0 -[ -f "/tmp/root.info" ] || exit 0 -. /tmp/root.info # disable manual ifup while netroot is set for simplifying our logic # in netroot case we prefer netroot to bringup $netif automaticlly diff --git a/modules.d/40network/netroot.sh b/modules.d/40network/netroot.sh index f44a97ba9..c5ee84c0a 100755 --- a/modules.d/40network/netroot.sh +++ b/modules.d/40network/netroot.sh @@ -15,8 +15,6 @@ type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh # instead of real netroot; If It's called without $2, then there's # no sense in doing something if no (net)root info is available # or root is already there -[ -e /tmp/root.info ] || exit 1 -. /tmp/root.info if [ -z "$2" ]; then [ -d $NEWROOT/proc ] && exit 0 [ -z "$netroot" ] && exit 1 diff --git a/modules.d/90dmsquash-live/apply-live-updates.sh b/modules.d/90dmsquash-live/apply-live-updates.sh index 144e8b913..61da4bf23 100755 --- a/modules.d/90dmsquash-live/apply-live-updates.sh +++ b/modules.d/90dmsquash-live/apply-live-updates.sh @@ -1,7 +1,5 @@ #!/bin/sh -. /tmp/root.info - if [ -b /dev/mapper/live-rw ] && [ -d /updates ]; then info "Applying updates to live image..." # avoid overwriting symlinks (e.g. /lib -> /usr/lib) with directories diff --git a/modules.d/90dmsquash-live/dmsquash-live-root.sh b/modules.d/90dmsquash-live/dmsquash-live-root.sh index e3606cf74..8a21e44db 100755 --- a/modules.d/90dmsquash-live/dmsquash-live-root.sh +++ b/modules.d/90dmsquash-live/dmsquash-live-root.sh @@ -5,8 +5,6 @@ type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh type det_fs >/dev/null 2>&1 || . /lib/fs-lib.sh -[ -f /tmp/root.info ] && . /tmp/root.info - PATH=/usr/sbin:/usr/bin:/sbin:/bin if getargbool 0 rd.live.debug -y rdlivedebug; then diff --git a/modules.d/90livenet/livenetroot.sh b/modules.d/90livenet/livenetroot.sh index bc627604f..617be62db 100755 --- a/modules.d/90livenet/livenetroot.sh +++ b/modules.d/90livenet/livenetroot.sh @@ -2,7 +2,6 @@ # livenetroot - fetch a live image from the network and run it type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh -[ -f /tmp/root.info ] && . /tmp/root.info . /lib/url-lib.sh diff --git a/modules.d/95iscsi/iscsiroot.sh b/modules.d/95iscsi/iscsiroot.sh index 7b8f63e7b..1bd6dd352 100755 --- a/modules.d/95iscsi/iscsiroot.sh +++ b/modules.d/95iscsi/iscsiroot.sh @@ -37,9 +37,6 @@ iroot=${iroot#iscsi:} # figured out a way how to check whether this is built-in or not modprobe crc32c 2>/dev/null - -[ -e /tmp/root.info ] && . /tmp/root.info - [ -e /sys/module/bnx2i ] && iscsiuio if getargbool 0 rd.iscsi.firmware -y iscsi_firmware ; then @@ -54,7 +51,7 @@ fi unset iscsi_initiator iscsi_target_name iscsi_target_ip iscsi_target_port unset iscsi_target_group iscsi_protocol iscsirw iscsi_lun -unset iscsi_username iscsi_password +unset iscsi_username iscsi_password unset iscsi_in_username iscsi_in_password # override conf settings by command line options diff --git a/modules.d/99base/init.sh b/modules.d/99base/init.sh index d19749721..96fd5f229 100755 --- a/modules.d/99base/init.sh +++ b/modules.d/99base/init.sh @@ -131,15 +131,7 @@ source_hook cmdline [ -z "$root" ] && die "No or empty root= argument" [ -z "$rootok" ] && die "Don't know how to handle 'root=$root'" -# Network root scripts may need updated root= options, -# so deposit them where they can see them (udev purges the env) -{ - echo "root='$root'" - echo "rflags='$rflags'" - echo "fstype='$fstype'" - echo "netroot='$netroot'" - echo "NEWROOT='$NEWROOT'" -} > /tmp/root.info +export root rflags fstype netroot NEWROOT # pre-udev scripts run before udev starts, and are run only once. getarg 'rd.break=pre-udev' 'rdbreak=pre-udev' && emergency_shell -n pre-udev "Break before pre-udev" @@ -314,6 +306,7 @@ else fi export RD_TIMESTAMP +export -n root rflags fstype netroot NEWROOT set +x # Turn off debugging for this section # Clean up the environment for i in $(export -p); do