[readonly/geninitrd: 539/1068] - seems like /proc is mounted with initramfs 2.6.22.14 kernel (could someone clarify this with lkml

draenog draenog at pld-linux.org
Sat Nov 2 19:57:43 CET 2013


commit 2bface63d7bf332d6035645b9e1ac00648ddd574
Author: Elan Ruusamäe <glen at pld-linux.org>
Date:   Tue Nov 27 17:12:08 2007 +0000

    - seems like /proc is mounted with initramfs 2.6.22.14 kernel (could someone clarify this with lkml or other link?)
    
    svn-id: @9110

 geninitrd | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
---
diff --git a/geninitrd b/geninitrd
index a69cf4d..6bc22b2 100755
--- a/geninitrd
+++ b/geninitrd
@@ -159,7 +159,13 @@ mount_proc() {
 	fi
 
 	proc_mounted=yes
-	echo "mount -t proc none /proc" | add_linuxrc
+    if [ "$INITRDFS" = "initramfs" ]; then
+		# /proc is mounted with initramfs 2.6.22.14 kernel
+		# XXX: remove when it is clear why proc was already mounted
+		echo "[ -f /proc/cmdline ] || mount -t proc none /proc" | add_linuxrc
+	else
+		echo "mount -t proc none /proc" | add_linuxrc
+	fi
 }
 
 # generate code to mount /sys on initrd
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/readonly/geninitrd.git/commitdiff/147754ca159d40ca5eb541074dc043d8cbd92090



More information about the pld-cvs-commit mailing list