diff options
Diffstat (limited to 'recipes/slugos-init/files/boot/nfs')
-rw-r--r-- | recipes/slugos-init/files/boot/nfs | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/recipes/slugos-init/files/boot/nfs b/recipes/slugos-init/files/boot/nfs new file mode 100644 index 0000000000..7f91889315 --- /dev/null +++ b/recipes/slugos-init/files/boot/nfs @@ -0,0 +1,31 @@ +#!/bin/sh +# boot from the nfs partition "$1" (which +# must be given) using options from the rest of +# the command line. + +# Use the standard init path (see /etc/init.d/rcS) +export PATH=/sbin:/bin:/usr/sbin:/usr/bin + +# Mount required fileystems if necessary +[ -e /proc/cpuinfo ] || mount -t proc proc /proc +[ -e /sys/class ] || mount -t sysfs sysfs /sys + +# Load the helper functions +. /etc/default/functions +. /etc/default/modulefunctions + +leds boot system + +if /boot/network +then + # load the nfs kernel module + loadnfsmods + + # network is up and running, the NFS mount will + # now succeed (possibly), use /boot/disk + exec /boot/disk "$@" +fi + +# fallback - use the flash boot +leds beep -f 1000 -r 2 +exec /boot/flash |