summaryrefslogtreecommitdiff
path: root/scripts/nfs
blob: 1e2be2caa1fd876db9f44a0402fd273bd0e09248 (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
# NFS filesystem mounting			*- shell-script -*-

# Paramter: Where the root should be mounted
mountroot ()
{
	run_scripts /scripts/nfs-top

	modprobe nfs
	# For DHCP
	modprobe af_packet

	ipconfig ${DEVICE}
	. /tmp/net-${DEVICE}.conf
	if [ "x${NFSROOT}" = "xauto" ]; then
		NFSROOT=${ROOTSERVER}:${ROOTPATH}
	fi

	run_scripts /scripts/nfs-premount

	if [ ${readonly} = y ]; then
		roflag="-o ro"
	else
		roflag="-o rw"
	fi

	nfsmount ${roflag} ${NFSROOT} ${rootmnt}

	run_scripts /scripts/nfs-bottom

}