SVN: geninitrd/branches/devel/geninitrd

czarny czarny at pld-linux.org
Thu Dec 14 11:16:06 CET 2006


Author: czarny
Date: Thu Dec 14 11:16:03 2006
New Revision: 8102

Modified:
   geninitrd/branches/devel/geninitrd
Log:
- proper udev generation - now udev works in initrd!
- PROBESTATICMODS otpion aded
- a lot of TODO's added
- functionally ready to go, but needs some reashaping to make it behave like a proffesional script, ie. no mounts and umounts of {proc,sys}!


Modified: geninitrd/branches/devel/geninitrd
==============================================================================
--- geninitrd/branches/devel/geninitrd	(original)
+++ geninitrd/branches/devel/geninitrd	Thu Dec 14 11:16:03 2006
@@ -5,6 +5,13 @@
 #	by PLD Linux Team
 #
 # based on mkinitrd from RedHat
+#
+# TODO:
+# - make udev start before insomds
+# - make proper use of USE_UDEV - don't copy fules if USE_UDEV is off no!
+# - sanitize - one mounting of /proc and /sys at the begining and one umount at the end!
+# - chekup and test and ready to go!
+#
 
 RCSID='$Id$'
 PATH=/sbin:$PATH
@@ -43,6 +50,9 @@
 BOOT_SPLASH=no
 # default same as bootsplash, if on install splashutils and some splashutils theme
 FB_SPLASH=no
+# defualt we don't use udev to make nodes for static modules, as per default
+# PLD loads the modules needed to mount and boot
+PROBESTATICMODULES=no
 
 # is /dev on tmpfs. internal variable
 tmpfs_dev=
@@ -1194,22 +1204,29 @@
 	mkdir -p $MNTIMAGE/sys
 
 	inst /sbin/initrd-udev $MNTIMAGE/sbin/udev
-	ln -s udev $MNTIMAGE/sbin/udevstart
 	inst /etc/udev/udev.conf $MNTIMAGE/etc/udev/udev.conf
 
-	ln -s udev $MNTIMAGE/sbin/hotplug
-
 	if is_yes "$USE_UDEV"; then
 		initrd_gen_tmpfs_dev >> "$s"
-		cat >> "$s" <<-EOF
-mount -t proc none /proc
-mount -t sysfs none /sys
-: 'Starting udev'
-/sbin/udevstart
-echo -n /sbin/hotplug > /proc/sys/kernel/hotplug
-umount /proc
-umount /sys
-EOF
+		cat >> "$s" <<- 'EOF'
+			mount -t proc none /proc
+			mount -t sysfs none /sys
+			: 'Starting udev'
+			/sbin/udev
+			echo -n /sbin/hotplug > /proc/sys/kernel/hotplug
+			EOF
+		if is_yes "$PROBESTATICMODS"; then
+			inst /sbin/initrd-udevtrigger $MNTIMAGE/sbin/udevtrigger
+			inst /sbin/initrd-udevsettle $MNTIMAGE/sbin/udevsettle
+			cat >> "$s" <<- 'EOF'
+				/sbin/udevtrigger
+				/sbin/udevsettle
+				EOF
+		fi
+		cat >> "$s" <<- 'EOF'
+			umount /proc
+			umount /sys
+			EOF
 	fi
 }
 


More information about the pld-cvs-commit mailing list