support normal nfs root definition syntax
parent
280117d934
commit
d4244cb25b
|
@ -1,21 +1,29 @@
|
|||
#!/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
|
||||
if [ "$root" = "dhcp" ]; then
|
||||
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/\//:/}"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
done
|
||||
done
|
||||
fi
|
||||
|
||||
if [ "${root#/dev/}" = "$root" -a "${root/:\///}" != "$root" ]; then
|
||||
nfsroot="$root"
|
||||
fi
|
||||
|
||||
|
||||
if [ -n "$nfsroot" ]; then
|
||||
#
|
||||
# modprobe nfs
|
||||
#
|
||||
# start rpc.statd ??
|
||||
mount -t nfs "$nfsroot" -o nolock "$NEWROOT" && ROOTFS_MOUNTED=yes
|
||||
fi
|
||||
|
|
|
@ -30,7 +30,7 @@ EOF
|
|||
expand-hosts
|
||||
domain=test.net
|
||||
dhcp-range=192.168.1.100,192.168.1.150,168h
|
||||
dhcp-option=17,"nfs://192.168.1.1/mnt/root"
|
||||
dhcp-option=17,"192.168.1.1:/mnt/root"
|
||||
EOF
|
||||
)
|
||||
inst /etc/nsswitch.conf /etc/nsswitch.conf
|
||||
|
|
Loading…
Reference in New Issue