echo $macaddr | sed 'y/ABCDEF/abcdef/'
}
+getargbool 0 rd.neednet && NEEDNET=1
+
# Don't continue if we don't need network
-if [ -z "$netroot" ] && [ ! -e "/tmp/net.ifaces" ] && ! getargbool 0 rd.neednet >/dev/null; then
+if [ -z "$netroot" ] && [ ! -e "/tmp/net.ifaces" ] && [ "$NEEDNET" != "1" ]; then
return
fi
elif [ -n "$IFACES" ] ; then
for iface in $IFACES ; do
printf 'SUBSYSTEM=="net", ENV{INTERFACE}=="%s", RUN+="%s"\n' "$iface" "/sbin/initqueue --onetime $ifup"
- if [ "$bootdev" = "$iface" ]; then
+ if [ "$bootdev" = "$iface" ] || [ "$NEEDNET" = "1" ]; then
echo "[ -f /tmp/setup_net_${iface}.ok ]" >$hookdir/initqueue/finished/wait-$iface.sh
fi
done
for iface in $MASTER_IFACES; do
- if [ "$bootdev" = "$iface" ]; then
+ if [ "$bootdev" = "$iface" ] || [ "$NEEDNET" = "1" ]; then
echo "[ -f /tmp/setup_net_${iface}.ok ]" >$hookdir/initqueue/finished/wait-$iface.sh
fi
done
for p in $(getargs ip=); do
ip_to_var $p
+ # make first device specified the BOOTDEV
+ if [ -z "$BOOTDEV" ] && [ -n "$dev" ]; then
+ BOOTDEV="$dev"
+ [ -n "$NEEDBOOTDEV" ] && warn "Setting bootdev to '$BOOTDEV'"
+ fi
+
# skip ibft since we did it above
[ "$autoconf" = "ibft" ] && continue
# Store BOOTDEV and IFACES for later use
[ -n "$BOOTDEV" ] && echo $BOOTDEV > /tmp/net.bootdev
[ -n "$IFACES" ] && echo $IFACES > /tmp/net.ifaces
-
-# We need a ip= line for the configured bootdev=
-[ -n "$NEEDBOOTDEV" ] && [ -z "$BOOTDEVOK" ] && die "Bootdev Argument '$BOOTDEV' not found"