[Lunar-commits] r19456 - lunar-iso/trunk/initrd/template/sbin
Auke Kok
sofar at lunar-linux.org
Sun Mar 26 20:16:04 UTC 2006
Author: sofar
Date: 2006-03-26 20:16:03 +0000 (Sun, 26 Mar 2006)
New Revision: 19456
Modified:
lunar-iso/trunk/initrd/template/sbin/init
Log:
rename skipinitrd flag to lose =0/=1
Add auto-module loading when modules passed on append line
Modified: lunar-iso/trunk/initrd/template/sbin/init
===================================================================
--- lunar-iso/trunk/initrd/template/sbin/init 2006-03-26 20:10:25 UTC (rev 19455)
+++ lunar-iso/trunk/initrd/template/sbin/init 2006-03-26 20:16:03 UTC (rev 19456)
@@ -49,6 +49,7 @@
$DIALOG --nocancel --inputbox "$HELP" 0 0
}
+
auto_load_modules()
{
MODULES=$(discover --data-path=linux/module/name --format="%s" --data-version=`uname -r` fixeddisk optical removabledisk tape)
@@ -220,8 +221,8 @@
export PATH=/bin:/usr/bin:/sbin:/usr/sbin
-export IFS="
-"
+export IFS=$'\t\n'
+
export DIALOGRC=/etc/dialogrc
DIALOG="dialog
--backtitle
@@ -245,8 +246,17 @@
# short timeout, we really need to be able to see debug info
sleep 2
+# load modules when passed on the boot prompt
+IFS=$' \t\n'
+for module in $(cat /proc/cmdline); do
+ if grep -q "/${module}.ko:" /lib/modules/`uname -r`/modules.dep; then
+ modprobe $module
+ fi
+done
+IFS=$'\t\n'
+
# fastboot or not?
-if cat /proc/cmdline | grep -q 'skipinitrd=1'; then
+if cat /proc/cmdline | grep -q 'skipinitrd'; then
echo ""
echo " /-------------- fast boot in process -----------------\\"
echo " | |"
More information about the Lunar-commits
mailing list