[Initng-svn] r2359 - initng/initfiles/system

svn at initng.thinktux.net svn at initng.thinktux.net
Thu Dec 8 10:32:20 CET 2005


Author: jimmy
Date: Thu Dec  8 10:32:19 2005
New Revision: 2359

Modified:
   initng/initfiles/system/initial.ii
Log:
Split system/initial into 3 subparts.
Recent udevsystem uses udevplug to coldplug all modules, and generate /dev entrys, 
and this  takes about 5 seconds on my fast machine, and nothing else can be done in parallell.



Modified: initng/initfiles/system/initial.ii
==============================================================================
--- initng/initfiles/system/initial.ii	(original)
+++ initng/initfiles/system/initial.ii	Thu Dec  8 10:32:19 2005
@@ -1,43 +1,43 @@
-service system/initial {
-    use = system/readahead;
+
+service system/initial/mountproc {
     critical;
     script start = {
 
 umask 022
 set -e
-
-# Set the console loglevel to 1 for a cleaner boot
-# the logger should anyhow dump the ring-0 buffer at start to the
-# logs, and that with dmesg can be used to check for problems
-@/bin/dmesg@ -n 1 &
-
+    
 echo "Mounting proc at /proc ..."
 @mkdir@ -p /proc && mount -n -t proc none /proc &
 
 echo "Mounting sysfs at /sys ..."
 @mkdir@ -p /sys && mount -n -t sysfs none /sys &
 
-# need /proc mounted here.
-wait 
+# Ok, go create /dev
+echo "Mounting ramfs at /dev ..."
+ at mkdir@ -p /dev && mount -n -o size=10M,mode=0755 -t tmpfs tmpfs /dev && @mknod@ /dev/null c 1 3 -m 666 &
 
-#ifd fedora
-@/sbin/setsysfont@
-#endd
+# Make sure all mounts are finished.
+wait 
 
-# look for the udevd daemon
-if [ ! -x @/sbin/udevd@ ]; then
-    echo "@/sbin/udevd@ missing, cant boot the computer!"
-    exit 1
-fi
+exit 0
+    };
+}
 
-# Ok, go create /dev
-echo "Mounting ramfs at /dev ..."
- at mkdir@ -p /dev && mount -n -o size=10M,mode=0755 -t tmpfs tmpfs /dev
- at mknod@ /dev/null c 1 3 -m 666
+# udevd to handle udev requests
+daemon system/initial/udevd {
+    need = system/initial/mountproc;
+    exec daemon = @/sbin/udevd@;
+}
 
-# Launch udevd daemon
-@/sbin/udevd@ --daemon
+# fill the /dev with all devices system have
+service system/initial/filldev {
+    need = system/initial/mountproc system/initial/udevd;
+    critical;
+    script start = {
 
+umask 022
+set -e    
+    
 if [ -e /lib/udev/devices ]
 then
 
@@ -110,6 +110,28 @@
 echo "Mounting devshm at /dev/shm ..."
 @mkdir@ -p /dev/shm && @mount@ -n -t tmpfs none /dev/shm &
 
+wait
+exit 0
+};
+}
+
+service system/initial {
+    need = system/initial/mountproc system/initial/udevd system/initial/filldev;
+    use = system/readahead;
+    critical;
+    script start = {
+
+umask 022
+set -e
+
+# Set the console loglevel to 1 for a cleaner boot
+# the logger should anyhow dump the ring-0 buffer at start to the
+# logs, and that with dmesg can be used to check for problems
+@/bin/dmesg@ -n 1 &
+
+#ifd fedora
+@/sbin/setsysfont@
+#endd
 
 # Setup hotplugging (if possible)
 if [ -e /proc/sys/kernel/hotplug ]
@@ -125,9 +147,4 @@
 wait
 exit 0
 };
-
-script stop = {
-    # Make sure udevd is no more running.
-    @killall@ udevd
-};
 }


More information about the Initng-svn mailing list