aboutsummaryrefslogtreecommitdiff
path: root/rc.sysinit
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2011-04-01 15:30:25 +0200
committerTom Gundersen <teg@jklm.no>2011-04-13 17:40:08 +0800
commit643bfecc67504d3765307534307c818441553081 (patch)
treec5a4563ef423291c7e6580bf0b535109fdb57e16 /rc.sysinit
parentade6b4c6eef564e8650b9ed780d10e5e5f50ef14 (diff)
downloadinitscripts-643bfecc67504d3765307534307c818441553081.tar.xz
/run: mount /run if it is not already mounted
This is in accordance with the new "standard" agreed on by the major distros, and discussed on our mailinglists. This folder will be used by udev/mdadm and other tools rather than putting things in /dev/.XXX. In the future we might symlink /var/{run,lock} to /run/{,lock} as the other distros are intending to do. First, we would have to make sure that /var/{run,lock} can be mounted as tmpfs without problems. Signed-off-by: Tom Gundersen <teg@jklm.no>
Diffstat (limited to 'rc.sysinit')
-rwxr-xr-xrc.sysinit11
1 files changed, 7 insertions, 4 deletions
diff --git a/rc.sysinit b/rc.sysinit
index e855e0d..1c1697d 100755
--- a/rc.sysinit
+++ b/rc.sysinit
@@ -16,10 +16,7 @@ run_hook sysinit_start
# export standard PATH (will be overridden later when /etc/profile is sourced, but is usefull for UDev)
export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
-# mount /proc, /sys and our RAM /dev
-/bin/mountpoint -q /proc || /bin/mount -n -t proc proc /proc -o nosuid,noexec,nodev
-/bin/mountpoint -q /sys || /bin/mount -n -t sysfs sysfs /sys -o nosuid,noexec,nodev
-
+# mount /dev, /proc, /sys, /run (the api filesystems)
if ! /bin/mountpoint -q /dev; then
if grep -q devtmpfs /proc/filesystems 2>/dev/null; then
/bin/mount -n -t devtmpfs udev /dev -o mode=0755,size=10M,nosuid
@@ -28,6 +25,12 @@ if ! /bin/mountpoint -q /dev; then
fi
fi
+/bin/mkdir -p /dev/{pts,shm}
+
+/bin/mountpoint -q /proc || /bin/mount -n -t proc proc /proc -o nosuid,noexec,nodev
+/bin/mountpoint -q /sys || /bin/mount -n -t sysfs sysfs /sys -o nosuid,noexec,nodev
+/bin/mountpoint -q /run || /bin/mount -n -t tmpfs tmpfs /run -o mode=755,size=10M,nosuid,noexec,nodev
+
# start up our mini logger until syslog takes over
/sbin/minilogd