Adding debian version 3.70~pre8+dfsg-1.
[syslinux-debian/hramrach.git] / gpxe / contrib / initrd / udhcpc-post
blob395d6c591cddf8f55d6c4dc868741e3ada9372ca
1 #!/bin/sh
2 # $Id$
4 if [ "$1" = "deconfig" ]; then
5 ifconfig $interface 0.0.0.0 up
6 else if [ "$1" = "bound" ] ; then
7 echo UDHCPC: I am $ip [$hostname], booting from $serverid
8 [ -n "$hostname" ] && echo $hostname > /proc/sys/kernel/hostname
9 [ -n "$broadcast" ] && BROADCAST="broadcast $broadcast"
10 [ -n "$subnet" ] && NETMASK="netmask $subnet"
11 ifconfig $interface $ip $BROADCAST $NETMASK
12 route add default gw $router dev $interface
13 echo -n > /etc/resolv.conf
14 for i in $dns; do
15 echo nameserver $i >> /etc/resolv.conf
16 done
17 [ -n "$siaddr" ] || siaddr=$serverid
18 [ -n "$rootpath" ] || rootpath=$siaddr:/
19 echo Mounting root filesystem $rootpath at /sysroot
20 echo If this appears to hang, check that the server of $rootpath is able to
21 echo reverse-map my IP address $ip to obtain my hostname $hostname
22 mount -t nfs -o nolock,rsize=8192,wsize=8192 $rootpath /sysroot