]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blob - src/initscripts/system/mountkernfs
mountkernfs: fix typo (wrong space character)
[people/pmueller/ipfire-2.x.git] / src / initscripts / system / mountkernfs
1 #!/bin/sh
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
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 -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 -t sysfs /sys /sys || failed=1
30 fi
31
32 if ! mountpoint /run &> /dev/null; then
33 boot_mesg -n " /run" ${NORMAL}
34 mount -n -t tmpfs -o nosuid,nodev,mode=755,size=8M /run /run || failed=1
35 fi
36
37 if ! mountpoint /sys/fs/cgroup &> /dev/null; then
38 boot_mesg -n " /sys/fs/cgroup" ${NORMAL}
39 mount -t cgroup2 none /sys/fs/cgroup || failed=1
40 fi
41
42 if ! mountpoint /sys/firmware/efi/efivars &>/dev/null && [ -d "/sys/firmware/efi" ]; then
43 boot_mesg -n " /sys/firmware/efi/efivars" ${NORMAL}
44 mount -t efivarfs efivarfs /sys/firmware/efi/efivars || failed=1
45 fi
46
47 # create folder for dhcpcd changeroot
48 mkdir -p /run/dhcpcd/chroot
49 chown dhcpcd:dhcpcd /run/dhcpcd/chroot
50 chmod 750 /run/dhcpcd/chroot
51
52 boot_mesg "" ${NORMAL}
53
54 (exit ${failed})
55 evaluate_retval
56 ;;
57
58 *)
59 echo "Usage: ${0} {start}"
60 exit 1
61 ;;
62 esac
63
64 # End $rc_base/init.d/mountkernfs