# 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.
#!/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
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}
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"
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}"
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
syslogd
#// Hostname
- hostname netboot-@@RELVER@@
+ hostname netboot
#// Setup dropbear (sshd)
echo -e ""