summaryrefslogtreecommitdiffstats
path: root/src.etc/init.d/mountkernfs
blob: 108a550b7b7649c0a3c6baad7745bf93dd90a2c6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/sh /etc/rc.common

start()
{
	log 'Mounting kernel virtual file systems'
	[ ! -e /proc/mounts ] && mount -t proc -o nodev,noexec,nosuid \
		proc /proc
	[ ! -e /sys/kernel ] && mount -t sysfs -o nodev,noexec,nosuid \
		sysfs /sys
}

stop()
{
	log 'Unmounting kernel virtual file systems'
	[ -e /proc/mounts ] && umount /proc
	[ -e /sys/kernel ] && umount /sys
}