source: bootscripts/lfs/init.d/mountvirtfs@ dda039b

11.2 11.2-rc1 11.3 11.3-rc1 12.0 12.0-rc1 12.1 12.1-rc1 bdubbs/gcc13 multilib renodr/libudev-from-systemd s6-init trunk xry111/arm64 xry111/arm64-12.0 xry111/clfs-ng xry111/loongarch xry111/loongarch-12.0 xry111/loongarch-12.1 xry111/mips64el xry111/pip3 xry111/rust-wip-20221008 xry111/update-glibc
Last change on this file since dda039b was dda039b, checked in by Pierre Labastie <pierre.labastie@…>, 2 years ago

Update comments in the mountvirtfs booscript

Since the kernel can mount /dev if given the proper config
parameter, and we tell users to set this parameter when building
the kernel, this should be mentioned in the script

  • Property mode set to 100644
File size: 2.0 KB
Line 
1#!/bin/sh
2########################################################################
3# Begin mountvirtfs
4#
5# Description : Ensure proc, sysfs, run, and dev are mounted
6#
7# Authors : Gerard Beekmans - gerard@linuxfromscratch.org
8# DJ Lucas - dj@linuxfromscratch.org
9# Update : Bruce Dubbs - bdubbs@linuxfromscratch.org
10#
11# Version : LFS 7.0
12#
13########################################################################
14
15### BEGIN INIT INFO
16# Provides: mountvirtfs
17# Required-Start: $first
18# Should-Start:
19# Required-Stop:
20# Should-Stop:
21# Default-Start: S
22# Default-Stop:
23# Short-Description: Mounts various special fs needed at start
24# Description: Mounts /sys and /proc virtual (kernel) filesystems.
25# Mounts /run (tmpfs) and /dev (devtmpfs).
26# This is done only if they are not already mounted.
27# with the kernel config proposed in the book, dev
28# should be automatically mounted by the kernel.
29# X-LFS-Provided-By: LFS
30### END INIT INFO
31
32. /lib/lsb/init-functions
33
34case "${1}" in
35 start)
36 # Make sure /run is available before logging any messages
37 if ! mountpoint /run >/dev/null; then
38 mount /run || failed=1
39 fi
40
41 mkdir -p /run/lock /run/shm
42 chmod 1777 /run/shm /run/lock
43
44 log_info_msg "Mounting virtual file systems: ${INFO}/run"
45
46 if ! mountpoint /proc >/dev/null; then
47 log_info_msg2 " ${INFO}/proc"
48 mount -o nosuid,noexec,nodev /proc || failed=1
49 fi
50
51 if ! mountpoint /sys >/dev/null; then
52 log_info_msg2 " ${INFO}/sys"
53 mount -o nosuid,noexec,nodev /sys || failed=1
54 fi
55
56 if ! mountpoint /dev >/dev/null; then
57 log_info_msg2 " ${INFO}/dev"
58 mount -o mode=0755,nosuid /dev || failed=1
59 fi
60
61 ln -sfn /run/shm /dev/shm
62
63 (exit ${failed})
64 evaluate_retval
65 exit $failed
66 ;;
67
68 *)
69 echo "Usage: ${0} {start}"
70 exit 1
71 ;;
72esac
73
74# End mountvirtfs
Note: See TracBrowser for help on using the repository browser.