CVS: initscripts/rc.d rc.sysinit,1.5,1.6
Jasper Huysmans
jasper at lunar-linux.org
Thu Nov 6 13:28:26 GMT 2003
Update of /var/cvs/lunar/initscripts/rc.d
In directory dbguin.lunar-linux.org:/tmp/cvs-serv25102/rc.d
Modified Files:
rc.sysinit
Log Message:
Add 2.6 kernel checks + load acpi modules (copied from RH cvs initscripts)
Index: rc.sysinit
===================================================================
RCS file: /var/cvs/lunar/initscripts/rc.d/rc.sysinit,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- rc.sysinit 4 Nov 2003 12:16:14 -0000 1.5
+++ rc.sysinit 6 Nov 2003 13:28:24 -0000 1.6
@@ -26,8 +26,18 @@
HOSTNAME=localhost
fi
+# check kernel version
+unamer=$(uname -r)
+
+case $unamer in
+ 2.6.*) TWODOTSIX=1 ;;
+ *) unset TWODOTSIX ;;
+esac
+
# Mount /proc (done here so volume labels can work with fsck)
mount -n -t proc /proc /proc
+[ -n "$TWODOTSIX" ] && mount -n -t sysfs /sys /sys
+mount -n -t devpts /dev/pts /dev/pts
. /etc/init.d/functions
@@ -120,17 +130,17 @@
case "$UTC" in
yes|true) CLOCKFLAGS="$CLOCKFLAGS --utc"
- CLOCKDEF="$CLOCKDEF (utc)" ;;
+ CLOCKDEF="$CLOCKDEF (utc)" ;;
no|false) CLOCKFLAGS="$CLOCKFLAGS --localtime"
- CLOCKDEF="$CLOCKDEF (localtime)" ;;
+ CLOCKDEF="$CLOCKDEF (localtime)" ;;
esac
case "$ARC" in
yes|true) CLOCKFLAGS="$CLOCKFLAGS --arc"
- CLOCKDEF="$CLOCKDEF (arc)" ;;
+ CLOCKDEF="$CLOCKDEF (arc)" ;;
esac
case "$SRM" in
yes|true) CLOCKFLAGS="$CLOCKFLAGS --srm"
- CLOCKDEF="$CLOCKDEF (srm)" ;;
+ CLOCKDEF="$CLOCKDEF (srm)" ;;
esac
/sbin/hwclock $CLOCKFLAGS
@@ -171,6 +181,13 @@
# Only read this once.
cmdline=$(cat /proc/cmdline)
+# Initialiaze ACPI bits
+if [ -d /proc/acpi ]; then
+ for module in /lib/modules/$unamer/kernel/drivers/acpi/* ; do
+ insmod $module
+ done
+fi
+
# Initialize USB controller and HID devices
# update_boot_stage RCusb
usb=0
@@ -200,9 +217,14 @@
needusbstorage=`LC_ALL=C grep -e "^I.*Cls=08" /proc/bus/usb/devices 2>/dev/null`
LC_ALL=C grep -q 'hid' /proc/bus/usb/drivers 2>/dev/null || \
action $"Initializing USB HID interface: " modprobe hid 2> /dev/null
- # FIXME: is this 2.4 specific ?
- action $"Initializing USB keyboard: " modprobe keybdev 2> /dev/null
- action $"Initializing USB mouse: " modprobe mousedev 2> /dev/null
+
+ if [ -z "$TWODOTSIX" ] ; then
+ action $"Initializing USB keyboard: " modprobe keybdev 2> /dev/null
+ action $"Initializing USB mouse: " modprobe mousedev 2> /dev/null
+ elif [ "$USB_HID_BOOTPROTO" = "yes" ]; then
+ action $"Initializing USB keyboard: " modprobe usbkbd 2> /dev/null
+ action $"Initializing USB mouse: " modprobe usbmouse 2> /dev/null
+ fi
fi
# Check file systems
@@ -354,8 +376,10 @@
# Enter root, /proc and (potentially) /proc/bus/usb and devfs into mtab.
mount -f /
mount -f /proc
-[ -f /proc/bus/usb/devices ] && mount -f -t usbdevfs usbdevfs /proc/bus/usb
+[ -n "$TWODOTSIX" ] && mount -f /sys
+[ -f /proc/bus/usb/devices ] && mount -f -t usbfs usbfs /proc/bus/usb
[ -e /dev/.devfsd ] && mount -f -t devfs devfs /dev
+mount -f /dev/pts
# The root filesystem is now read-write, so we can now log
@@ -366,8 +390,6 @@
USEMODULES=y
fi
-unamer=`uname -r`
-
# Our modutils don't support it anymore, so we might as well remove
# the preferred link.
rm -f /lib/modules/preferred /lib/modules/default
@@ -821,6 +843,7 @@
cat /proc/cpuinfo
[ -r /proc/modules ] && cat /proc/modules
[ -r /proc/ksyms ] && cat /proc/ksyms
+ [ -r /proc/kallsyms ] && cat /proc/kallsyms
} > /var/log/ksyms.0
chmod 600 /var/log/ksyms.0
# create the crash indicator flag to warn on crashes, offer fsck with timeout
More information about the Lunar-commits
mailing list