Make NixOS harder to kill on boot by leaving stale locks for mtab

svn path=/nixos/trunk/; revision=17734
This commit is contained in:
Michael Raskin 2009-10-09 16:09:56 +00:00
parent 679c3f9295
commit 32229e0c05

View file

@ -27,9 +27,10 @@ setPath "@path@"
# Mount special file systems.
mkdir -m 0755 -p /etc
test -e /etc/fstab || touch /etc/fstab # to shut up mount
[ -s /etc/mtab ] && rm /etc/mtab # while installing a symlink is created (see man mount), if it's still there for whateever reason remove it
rm -f /etc/mtab* # not that we care about stale locks
mkdir -m 0755 -p /proc
mount -n -t proc none /proc
[ -s /etc/mtab ] && rm /etc/mtab # while installing a symlink is created (see man mount), if it's still there for whateever reason remove it
rm -f /etc/mtab
cat /proc/mounts > /etc/mtab