diff options
author | Dave Reisner <dreisner@archlinux.org> | 2017-03-10 13:12:42 +0100 |
---|---|---|
committer | Dave Reisner <dreisner@archlinux.org> | 2017-03-10 13:19:24 +0100 |
commit | 70511e5ccb7e2500213e04173a70c067a7c9aa35 (patch) | |
tree | 3c2f80ed63d5360a76e98442d5dba61953d0ab6e /init_functions | |
parent | 5249350c80a6158ebcf278e780f42c6abc3643f1 (diff) | |
download | mkinitcpio-70511e5ccb7e2500213e04173a70c067a7c9aa35.tar.gz mkinitcpio-70511e5ccb7e2500213e04173a70c067a7c9aa35.tar.xz |
init: move early mounting to function, add efivars
ref: https://bugs.archlinux.org/task/52768
Diffstat (limited to 'init_functions')
-rw-r--r-- | init_functions | 12 |
1 files changed, 12 insertions, 0 deletions
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: |