#!/bin/sh
+exec >/dev/console 2>&1
+set -x
export PATH=/sbin:/bin:/usr/sbin:/usr/bin
export TERM=linux
export PS1='nfstest-server:\w\$ '
+echo > /dev/watchdog
stty sane
echo "made it to the rootfs!"
echo server > /proc/sys/kernel/hostname
ip addr add 192.168.50.2/24 dev eth0
ip addr add 192.168.50.3/24 dev eth0
ip link set eth0 up
+echo > /dev/watchdog
mount --bind /nfs/client /nfs/nfs3-5
+echo > /dev/watchdog
mount --bind /nfs/client /nfs/ip/192.168.50.101
+echo > /dev/watchdog
mount --bind /nfs/client /nfs/tftpboot/nfs4-5
+echo > /dev/watchdog
modprobe sunrpc
+echo > /dev/watchdog
mount -t rpc_pipefs sunrpc /var/lib/nfs/rpc_pipefs
+echo > /dev/watchdog
[ -x /sbin/portmap ] && portmap
+echo > /dev/watchdog
[ -x /sbin/rpcbind ] && rpcbind
+echo > /dev/watchdog
modprobe nfsd
+echo > /dev/watchdog
mount -t nfsd nfsd /proc/fs/nfsd
+echo > /dev/watchdog
exportfs -r
+echo > /dev/watchdog
rpc.nfsd
+echo > /dev/watchdog
rpc.mountd
+echo > /dev/watchdog
rpc.idmapd
+echo > /dev/watchdog
exportfs -r
+echo > /dev/watchdog
>/var/lib/dhcpd/dhcpd.leases
+echo > /dev/watchdog
chmod 777 /var/lib/dhcpd/dhcpd.leases
+echo > /dev/watchdog
dhcpd -cf /etc/dhcpd.conf -lf /var/lib/dhcpd/dhcpd.leases
-#sh -i
-# Wait forever for the VM to die
+echo -n "V" > /dev/watchdog
echo "Serving NFS mounts"
-while sleep 30; do >/dev/watchdog; done
+while :; do sleep 30; done
mount -n -o remount,ro /
poweroff -f