From bd85a03ffbbe362d9776483fb5cd5f5c3cdcd230 Mon Sep 17 00:00:00 2001
From: James Meyer <james.meyer@operamail.com>
Date: Sun, 5 Jul 2009 23:54:16 -0500
Subject: linhes-live:  add ability to list modules on cmdline to load
 modules=a,b,c

---
 abs/core-testing/linhes-live/PKGBUILD            |  2 +-
 abs/core-testing/linhes-live/etc/live-sysinit    | 19 +++++++++++++++++++
 abs/core-testing/linhes-live/etc/rc.sysinit-live |  3 +++
 3 files changed, 23 insertions(+), 1 deletion(-)

diff --git a/abs/core-testing/linhes-live/PKGBUILD b/abs/core-testing/linhes-live/PKGBUILD
index c1e4ff1..3367025 100644
--- a/abs/core-testing/linhes-live/PKGBUILD
+++ b/abs/core-testing/linhes-live/PKGBUILD
@@ -2,7 +2,7 @@
 # 2008.09.25
 pkgname=linhes-live
 pkgver=5.3.3
-pkgrel=19
+pkgrel=24
 
 pkgdesc="LinHes compulsory components for the Live System."
 url="http://KnoppMyth.net"
diff --git a/abs/core-testing/linhes-live/etc/live-sysinit b/abs/core-testing/linhes-live/etc/live-sysinit
index abab4a8..0a49ae1 100644
--- a/abs/core-testing/linhes-live/etc/live-sysinit
+++ b/abs/core-testing/linhes-live/etc/live-sysinit
@@ -52,3 +52,22 @@ f_swapon ()
         status "Activating Swap" /sbin/swapon -a
     fi
 }
+f_loadmodules()
+{
+    CMDLINE=$(cat /proc/cmdline)
+    echo $CMDLINE | grep -q modules
+    if [ $? -eq 0 ]
+    then
+        TEMPVAR=${CMDLINE#*modules=}
+        CMDMODULES=${TEMPVAR%% *}
+        mymod=`echo $CMDMODULES|/bin/sed 's|-|_|g' |/bin/sed 's|,| |g'`
+        stat_busy "Loading CMD module"
+        for mod in $mymod
+        do
+              /sbin/modprobe $mod
+        done
+        stat_done
+    fi
+
+
+}
diff --git a/abs/core-testing/linhes-live/etc/rc.sysinit-live b/abs/core-testing/linhes-live/etc/rc.sysinit-live
index 3f72a50..afdc2ae 100755
--- a/abs/core-testing/linhes-live/etc/rc.sysinit-live
+++ b/abs/core-testing/linhes-live/etc/rc.sysinit-live
@@ -176,6 +176,9 @@ fi
 # Load modules from the MODULES array defined in rc.conf
 if ! [ "$load_modules" = "off" ]; then
     if [ -f /proc/modules ]; then
+############Added by jm to load modules from /proc/cmdline
+	f_loadmodules
+##############
         stat_busy "Loading Modules"
         for mod in "${MODULES[@]}"; do
             if [ "$mod" = "${mod#!}" ]; then
-- 
cgit v0.12