Bug 2992 - Usage of .rhkmvtag in rc.sysinit
Usage of .rhkmvtag in rc.sysinit
Status: CLOSED CURRENTRELEASE
Product: Red Hat Linux
Classification: Retired
Component: initscripts (Show other bugs)
6.0
All Linux
medium Severity low
: ---
: ---
Assigned To: David Lawrence
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 1999-05-23 21:44 EDT by gaburici
Modified: 2008-05-01 11:37 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 1999-05-24 10:09:36 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description gaburici 1999-05-23 21:44:18 EDT
It seems to me that linking /lib/modules/default to the
real modules directory is not enough. If there is no
/lib/modules/`uname -r`/modules.dep then depmod -a will
fail.

To really make rhkmvtag to work I had to do it like this:

--- rc.sysinit.orig	Wed Apr 14 03:05:00 1999
+++ rc.sysinit	Mon May 24 04:07:24 1999
@@ -174,12 +174,17 @@
        mver=`uname -r`
     else
        ktag="`cat /proc/version`"
-       mtag=grep -l "$ktag" /lib/modules/*/.rhkmvtag 2>
/dev/null
+       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,[       ].*$,,'
+          mver=`echo $mtag | sed -e 's,/lib/modules/,,' -e
's,/.rhkmvtag,,' -e 's,[       ].*$,,'`
        fi
+       mkerver="/lib/modules/`uname -r`"
        if [ -n "$mver" ]; then
-         ln -sf /lib/modules/$mver /lib/modules/default
+	  if [ ! -d "$mkerver" -o -L "$mkerver" ]; then
+    	     # ls -sf doesn't seem able to delete a link...
+	     rm -rf $mkerver
+	     ln -sf /lib/modules/$mver $mkerver
+	  fi
        fi
     fi
     [ -n "$mver" -a -f "/boot/module-info-$mver" ] && ln
-sf /boot/module-info-$mver /boot/module-info

This conicidentaly fixes bug 2755 as well.

[note: there may be some unfortunate line wrapping due to
the bugzilla web interface.]


------- Email Received From  Vasile Gaburici <gaburici@fx.ro> 05/23/99 21:50 -------
Comment 1 Bill Nottingham 1999-05-24 10:09:59 EDT
First of all, you shouldn't be using rhkmvtag if you can avoid it.
Using the EXTRAVERSION tag in the kernel makefile is much more sane.

This has been fixed (in a slightly different manner) in the  latest
initscripts in Raw Hide.

Note You need to log in before you can comment on or make changes to this bug.