1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
|
#!/bin/execlineb -P
# /sys
foreground {
if -n { test -d /sys } mkdir -m 0755 /sys
if -n { mountpoint -q /sys }
mount -t sysfs sys /sys -o nosuid,noexec,nodev
}
# securityfs
foreground {
if -t { test -d /sys/kernel/security }
if -t { grep -qs securityfs /proc/filesystems }
if -n { mountpoint -q /sys/kernel/security }
mount -t securityfs securityfs /sys/kernel/security -o nosuid,noexec,nodev
}
# debugfs
foreground {
if -t { test -d /sys/kernel/debug }
if -t { grep -qs debugfs /proc/filesystems }
if -n { mountpoint -q /sys/kernel/debug }
mount -t debugfs debugfs /sys/kernel/debug -o nosuid,noexec,nodev
}
# configfs
foreground {
if -t { test -d /sys/kernel/config }
if -t { grep -qs configfs /proc/filesystems }
if -n { mountpoint -q /sys/kernel/config }
mount -t configfs configfs /sys/kernel/config -o nosuid,noexec,nodev
}
# fusectl
foreground {
if -t { test -d /sys/fs/fuse/connections }
if -t { grep -qs fusectl /proc/filesystems }
if -n { mountpoint -q /sys/fs/fuse/connections }
mount -t fusectl fusectl /sys/fs/fuse/connections -o nosuid,noexec,nodev
}
# pstore
foreground {
if -t { test -d /sys/fs/pstore }
if -t { grep -qs 'pstore$' /proc/filesystems }
if -n { mountpoint -q /sys/fs/pstore }
mount -t pstore pstore /sys/fs/pstore -o nosuid,noexec,nodev
}
# selinux
foreground {
if -t { test -d /sys/fs/selinux }
if -t { grep -qs selinuxfs /proc/filesystems }
if -n { mountpoint -q /sys/fs/selinux }
mount -t selinuxfs selinuxfs /sys/fs/selinux -o nosuid,noexec,nodev
}
# efivarfs
foreground {
if -t { test -d /sys/firmware/efi }
if -t { grep -qs efivarfs /proc/filesystems }
if { test -d /sys/firmware/efi }
if -n { mountpoint -q /sys/firmware/efi/efivars }
mount -n -t efivarfs efivarfs /sys/firmware/efi/efivars -o ro,nosuid,noexec,nodev
}
|