aboutsummaryrefslogtreecommitdiffstats
path: root/rc.d
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>1999-02-25 16:20:33 +0000
committerBill Nottingham <notting@redhat.com>1999-02-25 16:20:33 +0000
commit4d89a5fb08e34f1cb8442c72fb0a9eac4aa8aa74 (patch)
tree97abb168114300bc6e879eb494deddb762417c8c /rc.d
parent1deb95755d861f62295f31a57a45f696531463cd (diff)
downloadinitscripts-4d89a5fb08e34f1cb8442c72fb0a9eac4aa8aa74.tar
initscripts-4d89a5fb08e34f1cb8442c72fb0a9eac4aa8aa74.tar.gz
initscripts-4d89a5fb08e34f1cb8442c72fb0a9eac4aa8aa74.tar.bz2
initscripts-4d89a5fb08e34f1cb8442c72fb0a9eac4aa8aa74.tar.xz
initscripts-4d89a5fb08e34f1cb8442c72fb0a9eac4aa8aa74.zip
put preferred support back in
Diffstat (limited to 'rc.d')
-rwxr-xr-xrc.d/rc.sysinit16
1 files changed, 16 insertions, 0 deletions
diff --git a/rc.d/rc.sysinit b/rc.d/rc.sysinit
index 46e5efb6..3973ac10 100755
--- a/rc.d/rc.sysinit
+++ b/rc.d/rc.sysinit
@@ -124,8 +124,24 @@ else
USEMODULES=
fi
+rm -f /lib/modules/preferred
if [ -x /sbin/depmod -a -n "$USEMODULES" ]; then
# Get ready for kerneld/kmod if module support in the kernel
+ if [ -z `uname -r | grep "-"`]; then
+ # we're using a new kernel, no preferred needed
+ mver=`uname -r`
+ else
+ ktag="`cat /proc/version`"
+ mtag=grep -l "$ktag" /lib/modules/*/.rhkmvtag 2> /dev/null
+ if [ -n "$mtag" ]; then
+ mver=echo $mtag | sed -e 's,/lib/modules/,,' -e 's,/.rhkmvtag,,' -e 's,[ ].*$,,'
+ fi
+ if [ -n "$mver" ]; then
+ ln -sf /lib/modules/$mver /lib/modules/preferred
+ ln -sf /boot/System.map-$mver /boot/System.map
+ fi
+ fi
+ [ -n "$mver" -a -f "/boot/module-info-$mver" ] && ln -sf /boot/module-info-$mver /boot/module-info
action "Finding module dependencies" depmod -a
fi