summaryrefslogtreecommitdiff
path: root/scripts/local
blob: cf9e33131d7f3ec348e03f70e08c0db78d16fcda (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
# Local filesystem mounting

# Parameter: Where to mount the filesystem
mountroot ()
{
	run_scripts /scripts/local-top

	# Get the root filesystem type
	if [ ! -e ${ROOT} ]; then
		panic "ALERT!  ${ROOT} does not exist.  Dropping to a shell!"
	fi

	eval $(fstype < ${ROOT})

	run_scripts /scripts/local-premount

	if [ ${readonly} = y ]; then
		roflag=-r
	else
		roflag=-w
	fi

	# Mount root
	mount ${roflag} -t ${FSTYPE} ${ROOT} ${rootmnt}

	run_scripts /scripts/local-bottom
}