blob: 8a701a8eb6b18faee67dee482ae2c74edc1af594 (
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
|
#!/bin/sh
start()
{
printf '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
printf 'done.\n'
}
stop()
{
printf 'Unmounting kernel virtual file systems... '
[ -e /proc/mounts ] && umount /proc
[ -e /sys/kernel ] && umount /sys
printf 'done.\n'
}
case "${1}" in
start)
start
;;
stop)
stop
;;
*)
printf 'Usage: %s {start|stop}\n' "${0}" >&2
exit 1
;;
esac
|