aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2005-04-15 20:12:17 +0000
committerBill Nottingham <notting@redhat.com>2005-04-15 20:12:17 +0000
commit1b89d29f57a7860737465e6a07490bf293d4c7cc (patch)
treedcf6493881284db0837381d6c3391f71af0236a4
parent621984f5bce23692028dcb57b5dc6cce5b2f1272 (diff)
downloadinitscripts-1b89d29f57a7860737465e6a07490bf293d4c7cc.tar
initscripts-1b89d29f57a7860737465e6a07490bf293d4c7cc.tar.gz
initscripts-1b89d29f57a7860737465e6a07490bf293d4c7cc.tar.bz2
initscripts-1b89d29f57a7860737465e6a07490bf293d4c7cc.tar.xz
initscripts-1b89d29f57a7860737465e6a07490bf293d4c7cc.zip
load user-defined module scripts from /etc/sysconfig/modules at boot
(#123927)
-rw-r--r--Makefile1
-rw-r--r--initscripts.spec1
-rwxr-xr-xrc.d/rc.sysinit14
3 files changed, 12 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 0c31350a..53a23abd 100644
--- a/Makefile
+++ b/Makefile
@@ -41,6 +41,7 @@ install:
chmod 755 $(ROOT)/etc/sysconfig/network-scripts/ifup-*
chmod 755 $(ROOT)/etc/sysconfig/network-scripts/ifdown-*
chmod 755 $(ROOT)/etc/sysconfig/network-scripts/init*
+ mkdir -p $(ROOT)/etc/sysconfig/modules
mkdir -p $(ROOT)/etc/sysconfig/networking/devices
mkdir -p $(ROOT)/etc/sysconfig/networking/profiles/default
#mv $(ROOT)/etc/sysconfig/network-scripts/ifcfg-lo \
diff --git a/initscripts.spec b/initscripts.spec
index c0cef131..8d98924d 100644
--- a/initscripts.spec
+++ b/initscripts.spec
@@ -119,6 +119,7 @@ rm -rf $RPM_BUILD_ROOT
/etc/sysconfig/network-scripts/ifup
%config /sbin/ifup
%dir /etc/sysconfig/console
+%dir /etc/sysconfig/modules
%dir /etc/sysconfig/networking
%dir /etc/sysconfig/networking/devices
%dir /etc/sysconfig/networking/profiles
diff --git a/rc.d/rc.sysinit b/rc.d/rc.sysinit
index 29e3f2e6..7d81ace2 100755
--- a/rc.d/rc.sysinit
+++ b/rc.d/rc.sysinit
@@ -215,6 +215,16 @@ echo -n $" done"
success
echo
+# Load other user-defined modules
+for file in /etc/sysconfig/modules/*.modules ; do
+ [ -x $file ] && $file
+done
+
+# Load modules (for backward compatibility with VARs)
+if [ -f /etc/rc.modules ]; then
+ /etc/rc.modules
+fi
+
# Start the graphical boot, if necessary; /usr may not be mounted yet, so we
# may have to do this again after mounting
RHGB_STARTED=0
@@ -487,10 +497,6 @@ if [ -n "$SELINUX" -a strstr "$cmdline" autorelabel ]; then
relabel_selinux
fi
-# Load modules (for backward compatibility with VARs)
-if [ -f /etc/rc.modules ]; then
- /etc/rc.modules
-fi
# Start the graphical boot, if necessary and not done yet.
if strstr "$cmdline" rhgb && ! strstr "$cmdline" early-login && [ "$RHGB_STARTED" -eq 0 -a "$BOOTUP" = "color" -a "$GRAPHICAL" = "yes" -a -x /usr/bin/rhgb ]; then