diff options
author | Erik Troan <ewt@redhat.com> | 1998-03-30 23:42:50 +0000 |
---|---|---|
committer | Erik Troan <ewt@redhat.com> | 1998-03-30 23:42:50 +0000 |
commit | fbe4f2fdfe00ebb3a09449b317c4e8b533737f8e (patch) | |
tree | 42090fb7072eec8b7ee9738590af657e10129bef /rc.d/rc.sysinit | |
parent | f09c20531fc2f4183dcba49f7e7ef45b281f21ea (diff) | |
download | initscripts-fbe4f2fdfe00ebb3a09449b317c4e8b533737f8e.tar initscripts-fbe4f2fdfe00ebb3a09449b317c4e8b533737f8e.tar.gz initscripts-fbe4f2fdfe00ebb3a09449b317c4e8b533737f8e.tar.bz2 initscripts-fbe4f2fdfe00ebb3a09449b317c4e8b533737f8e.tar.xz initscripts-fbe4f2fdfe00ebb3a09449b317c4e8b533737f8e.zip |
make /lib/modules/default point to the proper modules for this kernel
Diffstat (limited to 'rc.d/rc.sysinit')
-rwxr-xr-x | rc.d/rc.sysinit | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/rc.d/rc.sysinit b/rc.d/rc.sysinit index 05c4fafe..cf881faa 100755 --- a/rc.d/rc.sysinit +++ b/rc.d/rc.sysinit @@ -111,6 +111,28 @@ else USEMODULES= fi +# Get the modules ready to go +rm -f /lib/modules/default +if [ -n $USEMODULES ]; then + set `cat /proc/cmdline` + while [ $# -gt 0 ]; do + if echo $1 | grep '^BOOT_IMAGE=' > /dev/null ; then + image=`echo $1 | cut -d= -f2` + kernelfile=`/sbin/lilo -I $image` + if [ -n "$kernelfile" ]; then + kernelname=`echo $kernelfile | cut -f1 -d-` + versioninfo=`echo $kernelfile | cut -f2- -d-` + if [ $kernelname = "/boot/vmlinuz" -a \ + -d /lib/modules/$versioninfo -a \ + $versioninfo != `uname -r` ]; then + ln -sf $versioninfo /lib/modules/default + fi + fi + fi + shift + done +fi + if [ -x /sbin/depmod -a -n "$USEMODULES" ]; then # Get ready for kerneld if module support in the kernel echo -n "Finding module dependencies" |