From 7e9c679f7e999ba191c5b8f22e4dd31de1879db4 Mon Sep 17 00:00:00 2001 From: Eric Hameleers Date: Sat, 27 Feb 2016 01:03:28 +0100 Subject: Determine KGEN properly so that it works for 32-bit Slackware as well. Thanks to SangDae YU for pointing it out. --- make_slackware_live.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/make_slackware_live.sh b/make_slackware_live.sh index 83915d1..77f3c8f 100755 --- a/make_slackware_live.sh +++ b/make_slackware_live.sh @@ -752,7 +752,7 @@ for SPS in ${SL_SERIES} ; do if [ "$SPS" = "a" -o "$SPS" = "min" ]; then # We need to take care of a few things first: - KGEN=$(echo ${INSTDIR}/var/log/packages/kernel*modules* |head -1 |rev | cut -d- -f3 |rev) + KGEN=$(echo ${INSTDIR}/var/log/packages/kernel*modules* |head -1 |rev | cut -d- -f3 |tr _ - |rev) KVER=$(ls --indicator-style=none ${INSTDIR}/lib/modules/ |head -1) if [ -z "$KVER" ]; then echo "-- Could not find installed kernel in '${INSTDIR}'! Exiting." @@ -814,7 +814,7 @@ umount ${LIVE_ROOTDIR} 2>${DBGOUT} || true mount -t overlay -o lowerdir=${RODIRS},upperdir=${INSTDIR},workdir=${LIVE_OVLDIR} overlay ${LIVE_ROOTDIR} # Determine the kernel version in the Live OS: -KGEN=$(echo ${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 |tr _ - |rev) KVER=$(ls --indicator-style=none ${LIVE_ROOTDIR}/lib/modules/ |head -1) # Configure hostname and network: @@ -1477,7 +1477,7 @@ mount --bind /sys ${LIVE_ROOTDIR}/sys mount --bind /dev ${LIVE_ROOTDIR}/dev # Determine the installed kernel version: -KGEN=$(echo ${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 |tr _ - |rev) KVER=$(ls --indicator-style=none ${LIVE_ROOTDIR}/lib/modules/ |head -1) # Create an initrd for the generic kernel, using a modified init script: -- cgit v1.2.3