3
0
Fork 0
forked from mirrors/nixpkgs

stage-2: reduce mkdir commands

This commit is contained in:
Jörg Thalheim 2017-04-05 00:28:24 +02:00
parent a17344c2ad
commit e3f031b200
No known key found for this signature in database
GPG key ID: CA4106B8D7CC79FA

View file

@ -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