aboutsummaryrefslogtreecommitdiffstats
path: root/rc.d
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>1999-02-04 19:32:20 +0000
committerBill Nottingham <notting@redhat.com>1999-02-04 19:32:20 +0000
commit259187b07b6e775ce79671f910cab860682e3912 (patch)
treec1b9cfd60572db928986e2a2401324e9f5b4f196 /rc.d
parentae6c4e57c4eda13956a9e5efe0956fd5c90e3a7c (diff)
downloadinitscripts-259187b07b6e775ce79671f910cab860682e3912.tar
initscripts-259187b07b6e775ce79671f910cab860682e3912.tar.gz
initscripts-259187b07b6e775ce79671f910cab860682e3912.tar.bz2
initscripts-259187b07b6e775ce79671f910cab860682e3912.tar.xz
initscripts-259187b07b6e775ce79671f910cab860682e3912.zip
swap workaround; kerneld/kmod fixes
Diffstat (limited to 'rc.d')
-rwxr-xr-xrc.d/init.d/single6
-rwxr-xr-xrc.d/rc.sysinit42
2 files changed, 28 insertions, 20 deletions
diff --git a/rc.d/init.d/single b/rc.d/init.d/single
index a2d4291e..a6376aae 100755
--- a/rc.d/init.d/single
+++ b/rc.d/init.d/single
@@ -26,7 +26,11 @@ rm -f /var/lock/subsys/*
[ -x /usr/bin/clear ] && /usr/bin/clear
# we just killed kerneld :-(
-/etc/rc.d/init.d/kerneld start
+if [ -f /proc/sys/kernel/modprobe ]; then
+ # /proc/sys/kernel/modprobe indicates built-in kmod instead
+ echo "/sbin/modprobe" > /proc/sys/kernel/modprobe
+else
+ /etc/rc.d/init.d/kerneld start
# Now go to the single user level.
echo "Telling INIT to go to single user mode."
diff --git a/rc.d/rc.sysinit b/rc.d/rc.sysinit
index 7367b805..4a3bb6cb 100755
--- a/rc.d/rc.sysinit
+++ b/rc.d/rc.sysinit
@@ -118,7 +118,7 @@ fi
mount -f /
mount -f /proc
-if [ -f /proc/ksyms ]; then
+if ! grep -i nomodules /proc/cmdline >/dev/null && [ -f /proc/ksyms ]; then
USEMODULES=y
else
USEMODULES=
@@ -148,25 +148,28 @@ if [ -x /sbin/depmod -a -n "$USEMODULES" ]; then
fi
# load sound modules
-if ! grep -i nomodules /proc/cmdline >/dev/null ; then
- if [ -n "$USEMODULES" ]; then
- if grep -s "alias sound" /etc/conf.modules > /dev/null ; then
- action "Loading sound module" modprobe sound
- if grep -s "alias midi" /etc/conf.modules > /dev/null ; then
- action "Loading midi module" modprobe midi
- fi
- fi
- fi
+if [ -n "$USEMODULES" ]; then
+ if grep -s "alias sound" /etc/conf.modules > /dev/null ; then
+ action "Loading sound module" modprobe sound
+ fi
+ if grep -s "alias midi" /etc/conf.modules > /dev/null ; then
+ action "Loading midi module" modprobe midi
+ fi
fi
-if [ -x /sbin/kerneld -a -n "$USEMODULES" ]; then
- if [ -f /proc/sys/kernel/modprobe ]; then
- # /proc/sys/kernel/modprobe indicates built-in kmod instead
- echo "/sbin/modprobe" > /proc/sys/kernel/modprobe
- else
- /sbin/kerneld
- KERNELD=yes
- fi
+if [ -n "$USEMODULES" ]; then
+
+if [ -f /proc/sys/kernel/modprobe ]; then
+ # /proc/sys/kernel/modprobe indicates built-in kmod instead
+ if [ -n "$USEMODULES" ]; then
+ echo "/sbin/modprobe" > /proc/sys/kernel/modprobe
+ else
+ echo "" > /proc/sys/kernel/modprobe
+ fi
+else
+ if [ -n "$USEMODULES" ]; then
+ [ -x /sbin/kerneld ] && action "Starting kerneld" /sbin/kerneld && KERNELD=yes
+ fi
fi
# Add raid devices
@@ -305,7 +308,8 @@ $CLOCK $CLOCKFLAGS
action "Setting clock $CLOCKDEF: `date`" date
# Right, now turn on swap in case we swap to files.
-action "Enabling swap space" swapon -a 2>&1 | grep -v "busy"
+swapon -a 2>&1 >/dev/null
+action "Enabling swap space" /bin/true
# Initialize the serial ports.
if [ -f /etc/rc.d/rc.serial ]; then