aboutsummaryrefslogtreecommitdiffstats
path: root/rc.d
diff options
context:
space:
mode:
Diffstat (limited to 'rc.d')
-rwxr-xr-xrc.d/rc.sysinit11
1 files changed, 7 insertions, 4 deletions
diff --git a/rc.d/rc.sysinit b/rc.d/rc.sysinit
index 35d78d8e..2460317e 100755
--- a/rc.d/rc.sysinit
+++ b/rc.d/rc.sysinit
@@ -169,14 +169,14 @@ rm -f /lib/modules/preferred
rm -f /lib/modules/default
if [ -x /sbin/depmod -a -n "$USEMODULES" ]; then
# Get ready for kmod if module support in the kernel
- if [ -z `uname -r | grep "-"` ]; then
+ if [ -n `uname -r | grep "-"` ]; then
# we're using a new kernel, no preferred needed
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
if [ -n "$mver" ]; then
ln -sf /lib/modules/$mver /lib/modules/default
@@ -184,7 +184,10 @@ if [ -x /sbin/depmod -a -n "$USEMODULES" ]; then
fi
[ -n "$mver" -a -f "/boot/module-info-$mver" ] && ln -sf /boot/module-info-$mver /boot/module-info
[ -n "$mver" -a -f "/boot/System.map-$mver" ] && ln -sf /boot/System.map-$mver /boot/System.map
- action "Finding module dependencies" depmod -a
+ if [ -L /lib/modules/default ]
+ action "Finding module dependencies" depmod -a default
+ else
+ action "Finding module dependencies" depmod -a
fi
# load sound modules