cat > "$s" <<EOF
#! /bin/sh
-
-set -x
+mount -t proc none /proc"
+if [ "$(awk ' /debuginitrd/ { print "yes"; } ' /proc/cmdline)" = "yes" ]; then
+ export DEBUG=yes
+ set -x
+fi
+umount /proc
EOF
chmod 755 "$s"
[ "$1" != "bound" ] && exit
[ -n "$broadcast" ] && BROADCAST="broadcast $broadcast"
[ -n "$subnet" ] && NETMASK="netmask $subnet"
-set -x
ifconfig $interface $ip $BROADCAST $NETMASK up
-set +x
if [ -n "$router" ]; then
for r in $router; do
- set -x
route add default gw $r dev $interface
- set +x
done
fi
umount /proc
if [ -n "$rootpath" ]; then
- set -x
mount -n -t nfs -o ro,nolock,posix,tcp,wsize=8192,rsize=8192 $rootpath /newroot
- set +x
else
- set +x
echo "Missing rootpath in what DHCP server sent to us. Failing..."
echo "All seen variables are listed below:"
set
- set -x
fi
EOF
chmod 755 "$MNTIMAGE/bin/setdhcp"
# disable noise from lvm accessing devices that aren't ready.
printk=\$(cat /proc/sys/kernel/printk)
echo 0 > /proc/sys/kernel/printk
- set -x
: 'Scanning for Volume Groups'
LVM_SYSTEM_DIR=/tmp lvm vgscan --ignorelockingfailure 2>/dev/null
fi
fi
umount /proc
-set -x
EOF
}
partition, maj, min);
}
' /proc/partitions)"
-set -x
if [ ! -b $device ]; then
mknod $device b $maj $min
fi