summaryrefslogtreecommitdiffstats
path: root/make_slackware_live.sh
diff options
context:
space:
mode:
author Eric Hameleers <alien@slackware.com>2016-01-15 13:45:04 +0100
committer Eric Hameleers <alien@slackware.com>2016-01-15 13:45:04 +0100
commitf62699d27a2e3b5b084c825cb3888f1a16189b96 (patch)
treefa3a5527dd59f604996b8bcb30681e372a2e6a57 /make_slackware_live.sh
parent57b0501d49113d11b0a996896aec9a2f4d60abdc (diff)
downloadliveslak-f62699d27a2e3b5b084c825cb3888f1a16189b96.tar.gz
liveslak-f62699d27a2e3b5b084c825cb3888f1a16189b96.tar.xz
Fix kernel version detection.
The new kernel has version number '4.4.0'. Yet the kernel package names, like the kernel source tarball, has a version '4.4'. We need to compensate.
Diffstat (limited to 'make_slackware_live.sh')
-rwxr-xr-xmake_slackware_live.sh8
1 files changed, 5 insertions, 3 deletions
diff --git a/make_slackware_live.sh b/make_slackware_live.sh
index fba6645..9ec5d62 100755
--- a/make_slackware_live.sh
+++ b/make_slackware_live.sh
@@ -715,7 +715,8 @@ for SPS in ${SL_SERIES} ; do
if [ "$SPS" = "a" -o "$SPS" = "min" ]; then
# We need to take care of a few things first:
- KVER=$(echo ${INSTDIR}/var/log/packages/kernel-generic-[0-9]* |rev |cut -d- -f3 |rev)
+ KGEN=$(echo ${INSTDIR}/var/log/packages/kernel*modules* |head -1 |rev | cut -d- -f3 |rev)
+ KVER=$(ls --indicator-style=none ${INSTDIR}/lib/modules/ |head -1)
if [ -z "$KVER" ]; then
echo "-- Could not find installed kernel in '${INSTDIR}'! Exiting."
exit 1
@@ -1301,7 +1302,8 @@ mount --bind /sys ${LIVE_ROOTDIR}/sys
mount --bind /dev ${LIVE_ROOTDIR}/dev
# Determine the installed kernel version:
-KVER=$(ls ${LIVE_ROOTDIR}/var/log/packages/kernel*modules* |head -1 |rev | cut -d- -f3 |rev)
+KGEN=$(echo ${LIVE_ROOTDIR}/var/log/packages/kernel*modules* |head -1 |rev | cut -d- -f3 |rev)
+KVER=$(ls --indicator-style=none ${LIVE_ROOTDIR}/lib/modules/ |head -1)
# Create an initrd for the generic kernel, using a modified init script:
echo "-- Creating initrd for kernel-generic $KVER ..."
@@ -1327,7 +1329,7 @@ mksquashfs ${LIVE_BOOT} ${LIVE_MOD_SYS}/0000-slackware_boot-${SL_VERSION}-${SL_A
# Note to self: syslinux does not 'see' files unless they are DOS 8.3 names?
rm -rf ${LIVE_STAGING}/boot
mkdir -p ${LIVE_STAGING}/boot
-cp -a ${LIVE_BOOT}/boot/vmlinuz-generic-$KVER ${LIVE_STAGING}/boot/generic
+cp -a ${LIVE_BOOT}/boot/vmlinuz-generic*-$KGEN ${LIVE_STAGING}/boot/generic
cp -a ${LIVE_BOOT}/boot/initrd_${KVER}.gz ${LIVE_STAGING}/boot/initrd.img
cp -a ${LIVE_TOOLDIR}/syslinux ${LIVE_STAGING}/boot/
# Make use of proper console font if we have it available: