network/parse-ip-opts.sh: relax bootdev handling

master
Harald Hoyer 2012-10-12 11:54:07 +02:00
parent dc67eda6bf
commit 7081e99735
1 changed files with 3 additions and 5 deletions

View File

@ -40,9 +40,10 @@ fi
unset count unset count


# If needed, check if bootdev= contains anything usable # If needed, check if bootdev= contains anything usable
BOOTDEV=$(getarg bootdev=)

if [ -n "$NEEDBOOTDEV" ] ; then if [ -n "$NEEDBOOTDEV" ] ; then
BOOTDEV=$(getarg bootdev=) || die "Please supply bootdev argument for multiple ip= lines" [ -z "$BOOTDEV" ] && warn "Please supply bootdev argument for multiple ip= lines"
[ -z "$BOOTDEV" ] && die "Bootdev argument is empty"
fi fi


# If ibft is requested, read ibft vals and write ip=XXX cmdline args # If ibft is requested, read ibft vals and write ip=XXX cmdline args
@ -96,9 +97,6 @@ for p in $(getargs ip=); do
IFACES="$IFACES $dev" IFACES="$IFACES $dev"
fi fi


# Small optimization for udev rules
[ -z "$NEEDBOOTDEV" ] && [ -n "$dev" ] && BOOTDEV=$dev

# Do we need to check for specific options? # Do we need to check for specific options?
if [ -n "$NEEDDHCP" ] || [ -n "$DHCPORSERVER" ] ; then if [ -n "$NEEDDHCP" ] || [ -n "$DHCPORSERVER" ] ; then
# Correct device? (Empty is ok as well) # Correct device? (Empty is ok as well)