[Lunar-commits] <moonbase> module-init-tools: it removes and replace the modutils-wrappers.
Florin Braescu
florin at lunar-linux.org
Sat Nov 5 08:24:49 CET 2011
commit 45a9c805e272c3d81b54973d21962ad8b2ba8bd6
Author: Florin Braescu <florin at lunar-linux.org>
Date: Sat Nov 5 08:24:49 2011 +0100
module-init-tools: it removes and replace the modutils-wrappers.
---
kernel/module-init-tools/BUILD | 11 ++++--
kernel/module-init-tools/DETAILS | 2 +-
kernel/module-init-tools/POST_INSTALL | 2 -
kernel/module-init-tools/PRE_BUILD | 5 +++
kernel/module-init-tools/init.d/modutils | 51 ++++++++++++++++++++++++++++++
5 files changed, 64 insertions(+), 7 deletions(-)
diff --git a/kernel/module-init-tools/BUILD b/kernel/module-init-tools/BUILD
index 6662495..fe5b86e 100644
--- a/kernel/module-init-tools/BUILD
+++ b/kernel/module-init-tools/BUILD
@@ -12,12 +12,15 @@
sedit "s:ln -s :ln -sf :" Makefile.in &&
- ./configure --build=$BUILD \
- --mandir=/usr/share/man \
- --prefix=/lib/module-init-tools/ &&
+ ./configure --prefix=/ \
+ --build=$BUILD \
+ --mandir=/usr/share/man
mkdir -p /etc/modprobe.d &&
- default_make
+ default_make &&
+
+ install -m0700 $SCRIPT_DIRECTORY/init.d/modutils /etc/init.d &&
+ ln -sf ../init.d/modutils /etc/rcS.d/S20modutils
) > $C_FIFO 2>&1
diff --git a/kernel/module-init-tools/DETAILS b/kernel/module-init-tools/DETAILS
index f3f1b03..af09d9a 100644
--- a/kernel/module-init-tools/DETAILS
+++ b/kernel/module-init-tools/DETAILS
@@ -8,7 +8,7 @@
SOURCE2_VFY=sha1:673fda8d8c4a9d5a88aa25f5e8c56fc60ff8fcee
WEB_SITE=http://www.kernel.org
ENTERED=20030410
- UPDATED=20110608
+ UPDATED=20111105
SHORT="Utilities essential for a modular Linux 2.6.x kernel"
cat << EOF
diff --git a/kernel/module-init-tools/POST_INSTALL b/kernel/module-init-tools/POST_INSTALL
index 8950ae0..e86a338 100644
--- a/kernel/module-init-tools/POST_INSTALL
+++ b/kernel/module-init-tools/POST_INSTALL
@@ -4,8 +4,6 @@ test -f /etc/modules.conf || touch /etc/modules.conf
source /etc/profile.d/module_init_tools-completion.rc
-module_installed modutils-wrappers || lin -c modutils-wrappers
-
cat << EOF
Customize /etc/modules.conf
diff --git a/kernel/module-init-tools/PRE_BUILD b/kernel/module-init-tools/PRE_BUILD
new file mode 100644
index 0000000..cf35dcb
--- /dev/null
+++ b/kernel/module-init-tools/PRE_BUILD
@@ -0,0 +1,5 @@
+if module_installed modutils-wrappers; then
+ lrm modutils-wrappers
+fi
+default_pre_build
+
diff --git a/kernel/module-init-tools/init.d/modutils b/kernel/module-init-tools/init.d/modutils
new file mode 100755
index 0000000..9208480
--- /dev/null
+++ b/kernel/module-init-tools/init.d/modutils
@@ -0,0 +1,51 @@
+#!/bin/bash
+#
+# modutils - load modules at startup
+# description: modutils, boot time module loading
+#
+
+start()
+{
+ # hide non-significant messages
+ dmesg -n5
+ 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
+ # restore message level
+ dmesg -n7
+}
+
+
+stop()
+{
+ exit 0
+
+}
+
+status()
+{
+ lsmod
+}
+
+
+case $1 in
+ start|stop|status) : ;;
+ *) echo "Usage: $0 {start|stop|status}"; exit 1 ;;
+esac
+
+
+. /lib/lsb/init-functions
+
More information about the Lunar-commits
mailing list