Bug 2992

Summary: Usage of .rhkmvtag in rc.sysinit
Product: [Retired] Red Hat Linux Reporter: gaburici
Component: initscriptsAssignee: David Lawrence <dkl>
Severity: low Docs Contact:
Priority: medium    
Version: 6.0CC: gaburici
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 1999-05-24 14:09:36 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description gaburici 1999-05-24 01:44:18 UTC
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

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`
        ktag="`cat /proc/version`"
-       mtag=grep -l "$ktag" /lib/modules/*/.rhkmvtag 2>
+       mtag=`grep -l "$ktag" /lib/modules/*/.rhkmvtag 2>
        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,[       ].*$,,'`
+       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
     [ -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> 05/23/99 21:50 -------

Comment 1 Bill Nottingham 1999-05-24 14:09:59 UTC
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.