aboutsummaryrefslogtreecommitdiffstats
path: root/rc.d
diff options
context:
space:
mode:
authorErik Troan <ewt@redhat.com>1998-06-07 19:16:08 +0000
committerErik Troan <ewt@redhat.com>1998-06-07 19:16:08 +0000
commit02c4edd6ea8c87aff8e6bce61c509a6c586d831b (patch)
treed7403c3f49f63b35e1a540a3b1624fba6e645bbc /rc.d
parent3168e089c7bbee12c8f5349bffda7e341b40e26c (diff)
downloadinitscripts-02c4edd6ea8c87aff8e6bce61c509a6c586d831b.tar
initscripts-02c4edd6ea8c87aff8e6bce61c509a6c586d831b.tar.gz
initscripts-02c4edd6ea8c87aff8e6bce61c509a6c586d831b.tar.bz2
initscripts-02c4edd6ea8c87aff8e6bce61c509a6c586d831b.tar.xz
initscripts-02c4edd6ea8c87aff8e6bce61c509a6c586d831b.zip
look for bootfile= to set /lib/modules/preferred symlink
Diffstat (limited to 'rc.d')
-rwxr-xr-xrc.d/rc.sysinit21
1 files changed, 12 insertions, 9 deletions
diff --git a/rc.d/rc.sysinit b/rc.d/rc.sysinit
index 231290bb..e53253cf 100755
--- a/rc.d/rc.sysinit
+++ b/rc.d/rc.sysinit
@@ -119,18 +119,21 @@ if [ -n $USEMODULES ]; then
if echo $1 | grep '^BOOT_IMAGE=' > /dev/null ; then
image=`echo $1 | awk -F= '{ print $2 }'`
kernelfile=`/sbin/lilo -I $image`
- if [ -n "$kernelfile" ]; then
- kernelname=`echo $kernelfile | awk -F- '{ print $1 }'`
- 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/preferred
- fi
- fi
+ elif echo $1 | grep '^bootfile=' > /dev/null ; then
+ kernelfile=`echo $1 | awk -F= '{ print $2 }'`
fi
shift
done
+
+ if [ -n "$kernelfile" ]; then
+ kernelname=`echo $kernelfile | awk -F- '{ print $1 }'`
+ 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/preferred
+ fi
+ fi
fi
if [ -x /sbin/depmod -a -n "$USEMODULES" ]; then