]>
Commit | Line | Data |
---|---|---|
73d9a908 | 1 | #!/bin/sh |
66c36198 PM |
2 | ############################################################################### |
3 | # # | |
4 | # IPFire.org - A linux based firewall # | |
5 | # Copyright (C) 2007-2022 IPFire Team <info@ipfire.org> # | |
6 | # # | |
7 | # This program is free software: you can redistribute it and/or modify # | |
8 | # it under the terms of the GNU General Public License as published by # | |
9 | # the Free Software Foundation, either version 3 of the License, or # | |
10 | # (at your option) any later version. # | |
11 | # # | |
12 | # This program is distributed in the hope that it will be useful, # | |
13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of # | |
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # | |
15 | # GNU General Public License for more details. # | |
16 | # # | |
17 | # You should have received a copy of the GNU General Public License # | |
18 | # along with this program. If not, see <http://www.gnu.org/licenses/>. # | |
19 | # # | |
20 | ############################################################################### | |
73d9a908 MT |
21 | |
22 | . /etc/sysconfig/rc | |
23 | . ${rc_functions} | |
24 | ||
25 | case "${1}" in | |
26 | start) | |
27 | boot_mesg -n "Mounting kernel-based file systems:" ${INFO} | |
28 | ||
29 | if ! mountpoint /proc &> /dev/null; then | |
30 | boot_mesg -n " /proc" ${NORMAL} | |
3a3759c6 | 31 | mount -n -t proc /proc /proc || failed=1 |
73d9a908 MT |
32 | fi |
33 | ||
34 | if ! mountpoint /sys &> /dev/null; then | |
35 | boot_mesg -n " /sys" ${NORMAL} | |
3a3759c6 | 36 | mount -n -t sysfs /sys /sys || failed=1 |
73d9a908 MT |
37 | fi |
38 | ||
b8e2d108 AF |
39 | if ! mountpoint /run &> /dev/null; then |
40 | boot_mesg -n " /run" ${NORMAL} | |
8b64b1b6 | 41 | mount -n -t tmpfs -o nosuid,nodev,mode=755,size=8M /run /run || failed=1 |
b8e2d108 AF |
42 | fi |
43 | ||
10a2b80c MT |
44 | if ! mountpoint /sys/fs/cgroup &> /dev/null; then |
45 | boot_mesg -n " /sys/fs/cgroup" ${NORMAL} | |
46 | mount -t cgroup2 none /sys/fs/cgroup || failed=1 | |
47 | fi | |
48 | ||
11a3bd48 | 49 | if ! mountpoint /sys/firmware/efi/efivars &>/dev/null && [ -d "/sys/firmware/efi" ]; then |
76050bdc MT |
50 | boot_mesg -n " /sys/firmware/efi/efivars" ${NORMAL} |
51 | mount -t efivarfs efivarfs /sys/firmware/efi/efivars || failed=1 | |
52 | fi | |
53 | ||
533c4312 AF |
54 | # create folder for dhcpcd changeroot |
55 | mkdir -p /run/dhcpcd/chroot | |
56 | chown dhcpcd:dhcpcd /run/dhcpcd/chroot | |
57 | chmod 750 /run/dhcpcd/chroot | |
58 | ||
73d9a908 MT |
59 | boot_mesg "" ${NORMAL} |
60 | ||
61 | (exit ${failed}) | |
62 | evaluate_retval | |
63 | ;; | |
64 | ||
65 | *) | |
66 | echo "Usage: ${0} {start}" | |
67 | exit 1 | |
68 | ;; | |
69 | esac |