Author: wiget
Date: Sat Dec  3 20:52:22 2011
New Revision: 12425

Modified:
   geninitrd/trunk/geninitrd
Log:
/run support

Modified: geninitrd/trunk/geninitrd
==============================================================================
--- geninitrd/trunk/geninitrd   (original)
+++ geninitrd/trunk/geninitrd   Sat Dec  3 20:52:22 2011
@@ -212,6 +212,17 @@
        echo "mount -t tmpfs none /tmp" | add_linuxrc
 }
 
+# generate code to mount /run on initrd
+# can be called multiple times
+mount_run() {
+       if is_yes "$run_mounted"; then
+               return
+       fi
+
+       run_mounted=yes
+       echo "mount -t tmpfs run /run" | add_linuxrc
+}
+
 # unmount all mountpoints mounted by geninitrd
 umount_all() {
 
@@ -220,6 +231,11 @@
        debugshell
        EOF
 
+       if is_yes "$run_mounted"; then
+               echo 'mount --bind /run /newroot/run' | add_linuxrc
+               echo 'umount /run' | add_linuxrc
+               run_mounted=no
+       fi
        if is_yes "$dev_mounted"; then
                echo 'umount /dev' | add_linuxrc
                dev_mounted=no
@@ -1228,7 +1244,7 @@
 ln -s linuxrc $DESTDIR/init
 
 # create dirs that we really need
-inst_d /{lib,bin,etc,dev{,/pts,/shm},loopfs,var,proc,sys}
+inst_d /{lib,bin,etc,dev{,/pts,/shm},loopfs,var,proc,run,sys}
 
 modules_install "$MODULES"
 
_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to