Initial support for --netboot option

integrate functionality from netboot udhcpc.scripts into default one
cleanup-cruft
Andrew Gaffney 16 years ago
parent cad80a2062
commit d781413d5a

@ -2,6 +2,11 @@
# Copyright 1999-2008 Gentoo Foundation; 2008 Chris Gianelloni, Andrew Gaffney
# Distributed under the GPL v2
07 Dec 2008; Andrew Gaffney <agaffney@gentoo.org> defaults/udhcpc.scripts,
gen_cmdline.sh, gen_determineargs.sh, netboot/linuxrc.x:
Initial support for --netboot option integrate functionality from netboot
udhcpc.scripts into default one
04 Dec 2008; Chris Gianelloni <wolf31o2@wolf31o2.org> genkernel:
Bumping version for release.

@ -1,7 +1,9 @@
#!/bin/sh
[ -z "$1" ] && echo "Error: should be called from udhcpc" && exit 1
case ${1} in
bound)
renew|bound)
[ -n "$broadcast" ] && BROADCAST="broadcast $broadcast"
[ -n "$subnet" ] && NETMASK="netmask $subnet"
[ -n "$rootpath" ] && echo "$rootpath" > /rootpath
@ -10,6 +12,10 @@ case ${1} in
busybox ifconfig $interface $ip $BROADCAST $NETMASK
if [ -n "${router}" ]
then
while route del default gw 0.0.0.0 dev $interface; do
:
done
for i in ${router}
do
busybox route add default gw ${i}

@ -91,6 +91,7 @@ longusage() {
echo " --> 'emerge cryptsetup-luks' with USE=-dynamic"
echo " --no-busybox Do not include busybox in the initramfs."
echo " --unionfs Include support for unionfs"
echo " --netboot Create a self-contained env in the initramfs"
echo " Internals"
echo " --arch-override=<arch> Force to arch instead of autodetect"
echo " --cachedir=<dir> Override the default cache location"
@ -249,6 +250,10 @@ parse_cmdline() {
CMD_UNIONFS=1
print_info 2 "CMD_UNIONFS: ${CMD_UNIONFS}"
;;
--netboot)
CMD_NETBOOT=1
print_info 2 "CMD_NETBOOT: ${CMD_NETBOOT}"
;;
--slowusb)
CMD_SLOWUSB=1
print_info 2 "CMD_SLOWUSB: ${CMD_SLOWUSB}"

@ -104,6 +104,7 @@ determine_real_args() {
set_config_with_override 1 DMRAID CMD_DMRAID
set_config_with_override 1 BUSYBOX CMD_BUSYBOX "yes"
set_config_with_override 1 UNIONFS CMD_UNIONFS
set_config_with_override 1 NETBOOT CMD_NETBOOT
set_config_with_override 1 DISKLABEL CMD_DISKLABEL
set_config_with_override 1 LUKS CMD_LUKS
set_config_with_override 1 MDADM CMD_MDADM

@ -84,7 +84,7 @@ StartUp() {
syslogd
#// Hostname
hostname netboot-@@RELVER@@
hostname netboot
#// Setup dropbear (sshd)
echo -e ""

Loading…
Cancel
Save