[Cbe-oss-dev] [PATCH 7/9] only do hotplug2 init if hotplug2 is present

Jeremy Kerr jk at ozlabs.org
Tue Oct 23 10:54:54 EST 2007


The current /init script unconditionally does the initialisation for
hotplug2, including mounting a new /dev. If hotplug2 isn't present, we
end up with no device nodes.

This change only does the hotplug2 init if hotplug2 is present, but
always mounts /sys.

Signed-off-by: Jeremy Kerr <jk at ozlabs.org>

---

 target/linux/generic-2.6/base-files/init |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Index: kamikaze/target/linux/generic-2.6/base-files/init
===================================================================
--- kamikaze.orig/target/linux/generic-2.6/base-files/init
+++ kamikaze/target/linux/generic-2.6/base-files/init
@@ -3,11 +3,12 @@
 
 export PATH=/bin:/sbin:/usr/bin:/usr/sbin
 mount none /proc -t proc
+mount none /sys -t sysfs
 
 if grep devfs /proc/filesystems > /dev/null; then
 	mount none /dev -t devfs
-else
-	mount -t sysfs none /sys
+
+elif [ -x /sbin/hotplug2 ]; then
 	mount -t tmpfs tmpfs /dev -o size=512K
 	mknod /dev/console c 5 1
 	mkdir /dev/pts



More information about the cbe-oss-dev mailing list