[arch-projects] [mkinitcpio] [RFC 2/2] Introduce /run

Thomas Bächler thomas at archlinux.org
Fri Apr 8 12:03:00 EDT 2011


Mount /run as a 10MB tmpfs with 1777 permissions early. Move it to /new_root
when switching.
---
 init         |    3 ++-
 install/base |    1 +
 2 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/init b/init
index d030f5f..a772e7f 100644
--- a/init
+++ b/init
@@ -18,6 +18,7 @@ else
   # /dev/mem is needed if we want to load uvesafb before triggering uevents
   /bin/mknod /dev/mem c 1 1
 fi
+/bin/mount -t tmpfs run /run -o nosuid,noexec,nodev,mode=1777,size=10M
 
 read CMDLINE </proc/cmdline
 
@@ -151,7 +152,7 @@ if [ -n "${udevpid}" ]; then
     done
 fi
 
-for d in proc sys dev; do
+for d in proc sys dev run; do
     if [ -d /new_root/${d} ]; then
         /bin/mount --move /${d} /new_root/${d}
     else
diff --git a/install/base b/install/base
index d1aa176..4a0ff14 100644
--- a/install/base
+++ b/install/base
@@ -12,6 +12,7 @@ install ()
     add_dir "/usr/bin"
     add_dir "/usr/lib"
     add_dir "/usr/sbin"
+    add_dir "/run"
 
     add_device "/dev/null" c 1 3
     add_device "/dev/zero" c 1 5
-- 
1.7.4.2



More information about the arch-projects mailing list