mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-05 12:34:00 +00:00
Make NixOS harder to kill on boot by leaving stale locks for mtab
svn path=/nixos/trunk/; revision=17734
This commit is contained in:
parent
679c3f9295
commit
32229e0c05
@ -27,9 +27,10 @@ setPath "@path@"
|
|||||||
# Mount special file systems.
|
# Mount special file systems.
|
||||||
mkdir -m 0755 -p /etc
|
mkdir -m 0755 -p /etc
|
||||||
test -e /etc/fstab || touch /etc/fstab # to shut up mount
|
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
|
mkdir -m 0755 -p /proc
|
||||||
mount -n -t proc none /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
|
rm -f /etc/mtab
|
||||||
cat /proc/mounts > /etc/mtab
|
cat /proc/mounts > /etc/mtab
|
||||||
|
Loading…
Reference in New Issue
Block a user