* The Powers That Be have decided that there shall be a /run to
replace /var/run and /var/lock. For instance, udev now keeps state in /run/udev instead of /dev/.udev. See http://lists.fedoraproject.org/pipermail/devel/2011-March/150031.html http://bugs.freestandards.org/show_bug.cgi?id=718 So this patch creates /run as a tmpfs, and symlinks /var/run to /run and /var/lock to /run/lock. TODO: create /run in stage 1 and propagate it to stage 2. svn path=/nixos/trunk/; revision=27803
This commit is contained in:
parent
23d7a822f1
commit
14636ba057
@ -16,8 +16,6 @@ let
|
|||||||
|
|
||||||
setupScript =
|
setupScript =
|
||||||
''
|
''
|
||||||
mkdir -p /var/lock
|
|
||||||
|
|
||||||
if ! test -d /home/smbd ; then
|
if ! test -d /home/smbd ; then
|
||||||
mkdir -p /home/smbd
|
mkdir -p /home/smbd
|
||||||
chown ${user} /home/smbd
|
chown ${user} /home/smbd
|
||||||
|
@ -98,9 +98,7 @@ mkdir -m 0755 -p /etc/nixos
|
|||||||
|
|
||||||
|
|
||||||
# Miscellaneous boot time cleanup.
|
# Miscellaneous boot time cleanup.
|
||||||
rm -rf /var/run
|
rm -rf /run /var/run /var/lock /var/log/upstart
|
||||||
rm -rf /var/lock
|
|
||||||
rm -rf /var/log/upstart
|
|
||||||
|
|
||||||
#echo -n "cleaning \`/tmp'..."
|
#echo -n "cleaning \`/tmp'..."
|
||||||
#rm -rf --one-file-system /tmp/*
|
#rm -rf --one-file-system /tmp/*
|
||||||
@ -123,14 +121,17 @@ rm -rf /nix/var/nix/chroots # recreated in activate-configuration.sh
|
|||||||
rm -rf /nix/var/nix/gcroots/tmp /nix/var/nix/temproots
|
rm -rf /nix/var/nix/gcroots/tmp /nix/var/nix/temproots
|
||||||
|
|
||||||
|
|
||||||
# Use a tmpfs for /var/run to ensure that / or /var can be unmounted
|
# Create a tmpfs on /run to hold runtime state for programs such as
|
||||||
# or at least remounted read-only during shutdown. (Upstart 0.6
|
# udev.
|
||||||
# apparently uses nscd to do some name lookups, resulting in it
|
mkdir -m 0755 -p /run
|
||||||
# holding some mmap mapping to deleted files in /var/run/nscd.
|
mount -t tmpfs -o "mode=755" none /run
|
||||||
# Similarly, portmap and statd have open files in /var/run and are
|
mkdir -m 0700 -p /run/lock
|
||||||
# needed during shutdown to unmount NFS volumes.)
|
|
||||||
mkdir -m 0755 -p /var/run
|
|
||||||
mount -t tmpfs -o "mode=755" none /var/run
|
# For backwards compatibility, symlink /var/run to /run, and /var/lock
|
||||||
|
# to /run/lock.
|
||||||
|
ln -s /run /var/run
|
||||||
|
ln -s /run/lock /var/lock
|
||||||
|
|
||||||
|
|
||||||
# Clear the resume device.
|
# Clear the resume device.
|
||||||
|
@ -94,7 +94,7 @@ with pkgs.lib;
|
|||||||
# Skip various special filesystems. Non-existent
|
# Skip various special filesystems. Non-existent
|
||||||
# mount points are typically tmpfs/aufs mounts from
|
# mount points are typically tmpfs/aufs mounts from
|
||||||
# the initrd.
|
# the initrd.
|
||||||
if [ "$mp" = /proc -o "$mp" = /sys -o "$mp" = /dev -o "$device" = "rootfs" -o "$mp" = /var/run -o ! -e "$mp" ]; then continue; fi
|
if [ "$mp" = /proc -o "$mp" = /sys -o "$mp" = /dev -o "$device" = "rootfs" -o "$mp" = /run -o "$mp" = /var/run -o "$mp" = /var/lock -o ! -e "$mp" ]; then continue; fi
|
||||||
|
|
||||||
echo "unmounting $mp..."
|
echo "unmounting $mp..."
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user