aboutsummaryrefslogtreecommitdiffstats
path: root/rc.d
diff options
context:
space:
mode:
authorErik Troan <ewt@redhat.com>1998-04-20 16:41:49 +0000
committerErik Troan <ewt@redhat.com>1998-04-20 16:41:49 +0000
commit8b53c8f5971325254b93c7c90b224a22eac6e781 (patch)
tree942ff064f3ec9be74646998268e2072b08a453f8 /rc.d
parentc533bec2cfe3b9290806930085342269ba09571b (diff)
downloadinitscripts-8b53c8f5971325254b93c7c90b224a22eac6e781.tar
initscripts-8b53c8f5971325254b93c7c90b224a22eac6e781.tar.gz
initscripts-8b53c8f5971325254b93c7c90b224a22eac6e781.tar.bz2
initscripts-8b53c8f5971325254b93c7c90b224a22eac6e781.tar.xz
initscripts-8b53c8f5971325254b93c7c90b224a22eac6e781.zip
sets up modules symlink properly
Diffstat (limited to 'rc.d')
-rwxr-xr-xrc.d/rc.sysinit11
1 files changed, 5 insertions, 6 deletions
diff --git a/rc.d/rc.sysinit b/rc.d/rc.sysinit
index 7479ac75..a3712bad 100755
--- a/rc.d/rc.sysinit
+++ b/rc.d/rc.sysinit
@@ -112,8 +112,7 @@ else
fi
# Get the modules ready to go -- we use awk here as cut is in /usr/bin
-rm -f /lib/modules/default
-if [ -n $USEMODULES ]; then
+if [ -n $USEMODULES -a ! -d /lib/modules/`uname -r` ]; then
set `cat /proc/cmdline`
while [ $# -gt 0 ]; do
if echo $1 | grep '^BOOT_IMAGE=' > /dev/null ; then
@@ -121,11 +120,11 @@ if [ -n $USEMODULES ]; then
kernelfile=`/sbin/lilo -I $image`
if [ -n "$kernelfile" ]; then
kernelname=`echo $kernelfile | awk -F- '{ print $1 }'`
- versioninfo=`echo $kernelfile | awk -F- '{ print $2 }'`
+ versioninfo=`echo $kernelfile | sed "s|${kernelname}-||"`
if [ "$kernelname" = "/boot/vmlinuz" -a \
- -d "/lib/modules/$versioninfo" -a \
- "$versioninfo" != `uname -r` ]; then
- ln -sf $versioninfo /lib/modules/default
+ -d /lib/modules/$versioninfo -a \
+ $versioninfo != `uname -r` ]; then
+ ln -sf $versioninfo /lib/modules/`uname -r`
fi
fi
fi