[Lunar-commits] CVS: lunar-iso/initrd/template/sbin init,1.1,1.2

Auke Kok sofar at lunar-linux.org
Tue Nov 30 10:36:58 UTC 2004


Update of /var/cvs/lunar/lunar-iso/initrd/template/sbin
In directory espresso.foo-projects.org:/tmp/cvs-serv8229/template/sbin

Modified Files:
	init 
Log Message:
Fastboot to installer target added: will skip straight to the install phase and auto-load modules, unless the iso is not detected.


Index: init
===================================================================
RCS file: /var/cvs/lunar/lunar-iso/initrd/template/sbin/init,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- init	22 Nov 2004 21:33:12 -0000	1.1
+++ init	30 Nov 2004 10:36:56 -0000	1.2
@@ -46,14 +46,20 @@
 {
     MODULES=$(/bin/discover --data-path=linux/module/name --format="%s" --data-version=`uname -r` fixeddisk optical removabledisk tape)
 
-    MODULES=`$DIALOG --inputbox "The following modules will be attempted to load. Press enter to load them, or edit the list manually. To cancel select 'Cancel'." 10 60 "$MODULES"`
+    if [ -z "$1" ]; then
+        MODULES=`$DIALOG --inputbox "The following modules will be attempted to load. Press enter to load them, or edit the list manually. To cancel select 'Cancel'." 10 60 "$MODULES"`
+    fi
     for MODULE in $MODULES ; do
       echo "Attempting to load \"$MODULE\":"
       modprobe $MODULE
-      sleep 2
+      if [ -z "$1" ]; then
+        sleep 2
+      fi
     done
-    echo "Finished loading modules!"
-    sleep 5
+    if [ -z "$1" ]; then
+      echo "Finished loading modules!"
+      sleep 5
+    fi
 }
 
 
@@ -165,8 +171,6 @@
 
 main()
 {
-    main_menu
-
     if [ -z "$ROOT" ] && [ -z "$LUNAR_CD" ]; then
         $DIALOG --msgbox "Unable to boot without a root." 0 0
         main $*
@@ -198,6 +202,14 @@
 }
 
 
+skipinitrd()
+{
+    auto_load_modules fast
+    scan_cdroms
+    main $*
+}
+
+
 export IFS="	
 "
 export DIALOGRC=/etc/dialogrc
@@ -215,4 +227,10 @@
 MOUNT="/mnt"
 ID="$MOUNT/.lunar-cd"
 
-main $*
+# fastboot or not?
+if cat /proc/cmdline | grep -q 'skipinitrd=1'; then
+    skipinitrd $*
+else
+    main_menu $*
+    main $*
+fi



More information about the Lunar-commits mailing list