[Lunar-commits] r19292 - moonbase/trunk/kernel/modutils-wrappers/init.d
Auke Kok
sofar at lunar-linux.org
Fri Mar 17 18:53:02 UTC 2006
Author: sofar
Date: 2006-03-17 18:53:02 +0000 (Fri, 17 Mar 2006)
New Revision: 19292
Modified:
moonbase/trunk/kernel/modutils-wrappers/init.d/modutils
Log:
cosmetic fixes here - nothing really changed.
Modified: moonbase/trunk/kernel/modutils-wrappers/init.d/modutils
===================================================================
--- moonbase/trunk/kernel/modutils-wrappers/init.d/modutils 2006-03-17 16:46:07 UTC (rev 19291)
+++ moonbase/trunk/kernel/modutils-wrappers/init.d/modutils 2006-03-17 18:53:02 UTC (rev 19292)
@@ -1,48 +1,47 @@
#!/bin/bash
-
+#
# modutils - load modules at startup
# description: modutils, boot time module loading
+#
-start () {
- echo "Loading modules."
+start()
+{
+ if [ -x /sbin/depmod ]; then
+ echo -n "Updating Module Dependencies"
+ depmod -a &> /dev/null &&
+ echo -e $RESULT_OK ||
+ echo -e $RESULT_FAIL
+ fi
+
+ if [ -e /etc/modules ] && [ -x /sbin/modprobe ]; then
+ echo "Loading modules: "
+ sed 's/#.*$//g' /etc/modules | grep -v '^$' | while read MODULE ARGS; do
+ echo -n " * Loading module: $MODULE"
+ modprobe $MODULE $ARGS &> /dev/null &&
+ echo -e $RESULT_OK ||
+ echo -e $RESULT_FAIL
+ done
+ fi
+}
- if [ -x /sbin/depmod ]; then
- echo -n " * Updating Module Dependencies"
- depmod -a &> /dev/null &&
- echo -e $RESULT_OK ||
- echo -e $RESULT_FAIL
+stop()
+{
+ exit 0
- fi
-
- if [ -e /etc/modules ] &&
- [ -x /sbin/modprobe ]; then
-
- while read MODULE ARGS; do
- case $MODULE in
- \#*|"") continue ;;
- esac
- echo -n " * Loading module: $MODULE"
- modprobe $MODULE $ARGS &> /dev/null &&
- echo -e $RESULT_OK ||
- echo -e $RESULT_FAIL
- done < /etc/modules
- fi
}
-stop () {
- exit 0
-}
-
-status () {
+status()
+{
lsmod
}
+
case $1 in
- start|stop|status) ;;
- *) echo "Usage: $0 {start|stop|status}"; exit 1 ;;
+ start|stop|status) : ;;
+ *) echo "Usage: $0 {start|stop|status}"; exit 1 ;;
esac
+
. /lib/lsb/init-functions
-
More information about the Lunar-commits
mailing list