blob: a2f6c3e517fa37414a415e531ed4068a279d8058 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
# NFS filesystem mounting -*- shell-script -*-
# FIXME This needs error checking
# Paramter: Where the root should be mounted
mountroot ()
{
[ "$quiet" != "y" ] && log_begin_msg "Running /scripts/nfs-top"
run_scripts /scripts/nfs-top
[ "$quiet" != "y" ] && log_end_msg
modprobe nfs
# For DHCP
modprobe af_packet
ipconfig ${DEVICE}
. /tmp/net-${DEVICE}.conf
if [ "x${NFSROOT}" = "xauto" ]; then
NFSROOT=${ROOTSERVER}:${ROOTPATH}
fi
if [ "x${NFSOPTS}" = "x" ]; then
NFSOPTS="-o retrans=10"
fi
[ "$quiet" != "y" ] && log_begin_msg "Running /scripts/nfs-premount"
run_scripts /scripts/nfs-premount
[ "$quiet" != "y" ] && log_end_msg
if [ ${readonly} = y ]; then
roflag="-o ro"
else
roflag="-o rw"
fi
nfsmount ${roflag} ${NFSOPTS} ${NFSROOT} ${rootmnt}
[ "$quiet" != "y" ] && log_begin_msg "Running /scripts/nfs-bottom"
run_scripts /scripts/nfs-bottom
[ "$quiet" != "y" ] && log_end_msg
}
|