From e3f031b200dfb92ecefa73e02878b724194a1d8b Mon Sep 17 00:00:00 2001 From: Jörg Thalheim Date: Wed, 5 Apr 2017 00:28:24 +0200 Subject: stage-2: reduce mkdir commands --- nixos/modules/system/boot/stage-2-init.sh | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) (limited to 'nixos/modules/system/boot') diff --git a/nixos/modules/system/boot/stage-2-init.sh b/nixos/modules/system/boot/stage-2-init.sh index 19e0877d3642..2b89c888ac8f 100644 --- a/nixos/modules/system/boot/stage-2-init.sh +++ b/nixos/modules/system/boot/stage-2-init.sh @@ -80,13 +80,9 @@ ln -s /proc/mounts /etc/mtab # More special file systems, initialise required directories. [ -e /proc/bus/usb ] && mount -t usbfs usbfs /proc/bus/usb # UML doesn't have USB by default mkdir -m 01777 -p /tmp -mkdir -m 0755 -p /var /var/log /var/lib /var/db -mkdir -m 0755 -p /nix/var -mkdir -m 0700 -p /root -chmod 0700 /root -mkdir -m 0755 -p /bin # for the /bin/sh symlink -mkdir -m 0755 -p /home -mkdir -m 0755 -p /etc/nixos +mkdir -m 0755 -p /var/{log,lib,db} /nix/var /etc/nixos/ \ + /run/lock /home /bin # for the /bin/sh symlink +install -m 0700 -d /root # Miscellaneous boot time cleanup. @@ -98,9 +94,6 @@ rm -f /etc/{group,passwd,shadow}.lock rm -rf /nix/var/nix/gcroots/tmp /nix/var/nix/temproots -mkdir -m 0755 -p /run/lock - - # For backwards compatibility, symlink /var/run to /run, and /var/lock # to /run/lock. ln -s /run /var/run -- cgit 1.4.1