diff options
-rw-r--r-- | init | 6 | ||||
-rw-r--r-- | init_functions | 12 |
2 files changed, 13 insertions, 5 deletions
@@ -7,11 +7,7 @@ rd_logmask=0 . /init_functions -mount -t proc proc /proc -o nosuid,noexec,nodev -mount -t sysfs sys /sys -o nosuid,noexec,nodev -mount -t devtmpfs dev /dev -o mode=0755,nosuid -mount -t tmpfs run /run -o nosuid,nodev,mode=0755 -mkdir -m755 /run/initramfs +mount_setup # parse the kernel command line parse_cmdline </proc/cmdline diff --git a/init_functions b/init_functions index d5a584e..dfe2036 100644 --- a/init_functions +++ b/init_functions @@ -481,4 +481,16 @@ rdlogger() { rm -f /run/initramfs/rdlogger.pipe /run/initramfs/rdlogger.pid } +mount_setup() { + mount -t proc proc /proc -o nosuid,noexec,nodev + mount -t sysfs sys /sys -o nosuid,noexec,nodev + mount -t devtmpfs dev /dev -o mode=0755,nosuid + mount -t tmpfs run /run -o nosuid,nodev,mode=0755 + mkdir -m755 /run/initramfs + + if [ -e /sys/firmware/efi ]; then + mount -t efivarfs efivarfs /sys/firmware/efi/efivars -o nosuid,nodev,noexec + fi +} + # vim: set ft=sh ts=4 sw=4 et: |