make root=dhcp work
parent
9faf9b0690
commit
28df9479e1
|
@ -93,6 +93,12 @@ ip_to_var() {
|
||||||
[ -n "$autoconf" ] || autoconf=off
|
[ -n "$autoconf" ] || autoconf=off
|
||||||
}
|
}
|
||||||
|
|
||||||
|
root=$(getarg root)
|
||||||
|
ip=$(getarg ip)
|
||||||
|
|
||||||
|
if [ "$root" = "dhcp" -a -z "$ip" ]; then
|
||||||
|
do_dhcp;
|
||||||
|
else
|
||||||
# spin through the kernel command line, looking for ip= lines
|
# spin through the kernel command line, looking for ip= lines
|
||||||
for p in $(cat /proc/cmdline); do
|
for p in $(cat /proc/cmdline); do
|
||||||
[ -n "${p%ip=*}" ] && continue
|
[ -n "${p%ip=*}" ] && continue
|
||||||
|
@ -109,4 +115,5 @@ for p in $(cat /proc/cmdline); do
|
||||||
esac
|
esac
|
||||||
break
|
break
|
||||||
done
|
done
|
||||||
|
fi
|
||||||
exit 0
|
exit 0
|
||||||
|
|
Loading…
Reference in New Issue