]> git.pld-linux.org Git - projects/geninitrd.git/commitdiff
- proper udev generation - now udev works in initrd! devel
authorczarny <czarny@pld-linux.org>
Thu, 14 Dec 2006 10:16:03 +0000 (10:16 +0000)
committerczarny <czarny@pld-linux.org>
Thu, 14 Dec 2006 10:16:03 +0000 (10:16 +0000)
- 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}!

svn-id: @8102

geninitrd

index 351ee8a86e26e52c90ba9670d7207a7ca3e4b553..295c017cbe08bd3ec8b52ac36b8fc5dfd52981dc 100755 (executable)
--- a/geninitrd
+++ b/geninitrd
@@ -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 @@ rootdev_nr=0
 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 @@ initrd_gen_udev() {
        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
 }
 
This page took 0.206477 seconds and 4 git commands to generate.