# 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
# 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
#!/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
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
# 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
# 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
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
[ -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"
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