basic support for "nfs://" dhcp root_path

master
Harald Hoyer 2009-05-18 19:31:08 +02:00
parent a8084e23dd
commit a86c07a0b4
2 changed files with 24 additions and 0 deletions

3
modules.d/95NFS/install Executable file
View File

@ -0,0 +1,3 @@
#!/bin/sh
inst mount.nfs
inst_hook mount 96 "$moddir/nfs-mount-root.sh"

View File

@ -0,0 +1,21 @@
#!/bin/sh
set -x

for dev in /net.*.dhcpopts; do
if [ -f "$dev" ]; then
. "$dev"
[ -n "$new_root_path" ] && nfsroot="$new_root_path"
if [ ! -s /.resume -a "$nfsroot" ]; then
if [ "${nfsroot#nfs://}" != "$nfsroot" ]; then
nfsroot="${nfsroot#nfs://}"
nfsroot="${nfsroot/\//:/}"
#
#modprobe nfs
#
# start rpc.statd ??
mount -t nfs "$nfsroot" -o nolock "$NEWROOT" && ROOTFS_MOUNTED=yes
fi
fi
fi
done