aboutsummaryrefslogtreecommitdiffstats
path: root/rc.d/rc.sysinit
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/rc.sysinit
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/rc.sysinit')
-rwxr-xr-xrc.d/rc.sysinit42
1 files changed, 23 insertions, 19 deletions
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