make root=dhcp work

master
Harald Hoyer 2009-05-25 16:48:01 +02:00
parent 9faf9b0690
commit 28df9479e1
1 changed files with 21 additions and 14 deletions

View File

@ -93,8 +93,14 @@ ip_to_var() {
[ -n "$autoconf" ] || autoconf=off [ -n "$autoconf" ] || autoconf=off
} }


# spin through the kernel command line, looking for ip= lines root=$(getarg root)
for p in $(cat /proc/cmdline); do ip=$(getarg ip)

if [ "$root" = "dhcp" -a -z "$ip" ]; then
do_dhcp;
else
# spin through the kernel command line, looking for ip= lines
for p in $(cat /proc/cmdline); do
[ -n "${p%ip=*}" ] && continue [ -n "${p%ip=*}" ] && continue
ip_to_var ${p#ip=} ip_to_var ${p#ip=}
@ -108,5 +114,6 @@ for p in $(cat /proc/cmdline); do
''|none|off) ;; ''|none|off) ;;
esac esac
break break
done done
fi
exit 0 exit 0