source: bootscripts-standard/bootscripts/clfs/init.d/mountkernfs

Last change on this file was 609a9e7, checked in by William Harrington <kb0iic@…>, 10 years ago

Bring bootscripts up to date with 2.0-pre1

  • Property mode set to 100644
File size: 1.2 KB
Line 
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. /etc/sysconfig/rc
16. ${rc_functions}
17
18case "${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 ;;
49esac
50
51# End $rc_base/init.d/mountkernfs
Note: See TracBrowser for help on using the repository browser.