source:
bootscripts-standard/boot-scripts/clfs/init.d/mountkernfs@
8b29156
Last change on this file since 8b29156 was 77aff82, checked in by , 11 years ago | |
---|---|
|
|
File size: 1.2 KB |
Rev | Line | |
---|---|---|
[77aff82] | 1 | #!/bin/bash |
2 | ######################################################################## | |
3 | # Begin $rc_base/init.d/mountkernfs | |
4 | # | |
5 | # Description : Mount proc and sysfs | |
6 | # | |
7 | # Authors : Gerard Beekmans - gerard@linuxfromscratch.org | |
8 | # | |
9 | # Version : 00.00 | |
10 | # | |
11 | # Notes : | |
12 | # | |
13 | ######################################################################## | |
14 | ||
15 | . /tools/etc/sysconfig/rc | |
16 | . ${rc_functions} | |
17 | ||
18 | case "${1}" in | |
19 | start) | |
20 | boot_mesg -n "Mounting kernel-based file systems:" ${INFO} | |
21 | ||
22 | if ! mountpoint /proc >/dev/null; then | |
23 | boot_mesg -n " /proc" ${NORMAL} | |
24 | mount -n -o nosuid,noexec,nodev -t proc proc /proc || failed=1 | |
25 | fi | |
26 | ||
27 | if ! mountpoint /sys >/dev/null; then | |
28 | boot_mesg -n " /sys" ${NORMAL} | |
29 | mount -n -o nosuid,noexec,nodev -t sysfs sys /sys || failed=1 | |
30 | fi | |
31 | if ! mountpoint /run >/dev/null; then | |
32 | boot_mesg -n " /run" ${NORMAL} | |
33 | mount -n -o mode=0755,nosuid,nodev -t tmpfs run /run || failed=1 | |
34 | fi | |
35 | if ! mountpoint /dev >/dev/null; then | |
36 | boot_mesg -n " /dev" ${NORMAL} | |
37 | mount -n -o mode=0755,nosuid -t devtmpfs dev /dev || failed=1 | |
38 | fi | |
39 | (exit ${failed}) | |
40 | ||
41 | mkdir -m 1777 /run/lock | |
42 | mkdir -p /dev/{pts,shm} | |
43 | ;; | |
44 | ||
45 | *) | |
46 | echo "Usage: ${0} {start}" | |
47 | exit 1 | |
48 | ;; | |
49 | esac | |
50 | ||
51 | # End $rc_base/init.d/mountkernfs |
Note:
See TracBrowser
for help on using the repository browser.