diff options
Diffstat (limited to 'make_slackware_live.sh')
-rwxr-xr-x | make_slackware_live.sh | 26 |
1 files changed, 20 insertions, 6 deletions
diff --git a/make_slackware_live.sh b/make_slackware_live.sh index f8aa50b..9601a7b 100755 --- a/make_slackware_live.sh +++ b/make_slackware_live.sh @@ -383,6 +383,17 @@ function cleanup() { trap 'echo "*** $0 FAILED at line $LINENO ***"; cleanup; exit 1' ERR INT TERM +# Slackware since September 2024 no longer has a kernel-modules package, +# nor kernel-huge; all modules are added to the kernel-generic package: +function find_modulespackage() { + local MYDIR=$1 + if ls ${MYDIR}/var/log/packages/kernel*modules* 1>/dev/null 2>/dev/null; then + echo modules + else + echo generic + fi +} # End of find_modulespackage() + # Uncompress the initrd based on the compression algorithm used: function uncompressfs() { if $(file "${1}" | grep -qi ": gzip"); then @@ -1731,11 +1742,12 @@ for SPS in ${SL_SERIES} ; do if [ "$SPS" = "a" -a "$CORE2RAM" = "NO" ] || [ "$SPS" = "${MINLIST}" ]; then # We need to take care of a few things first: + KPKGDET=$(find_modulespackage $INSTDIR) if [ "$SL_ARCH" = "x86_64" -o "$SMP32" = "NO" ]; then - KGEN=$(ls --indicator-style=none ${INSTDIR}/var/log/packages/kernel*modules* |grep -v smp |head -1 |rev | cut -d- -f3 |tr _ - |rev) + KGEN=$(ls --indicator-style=none ${INSTDIR}/var/log/packages/kernel*${KPKGDET}* |grep -v smp |head -1 |rev | cut -d- -f3 |tr _ - |rev) KVER=$(ls --indicator-style=none ${INSTDIR}/lib/modules/ |grep -v smp |head -1) else - KGEN=$(ls --indicator-style=none ${INSTDIR}/var/log/packages/kernel*modules* |grep smp |head -1 |rev | cut -d- -f3 |tr _ - |rev) + KGEN=$(ls --indicator-style=none ${INSTDIR}/var/log/packages/kernel*${KPKGDET}* |grep smp |head -1 |rev | cut -d- -f3 |tr _ - |rev) KVER=$(ls --indicator-style=none ${INSTDIR}/lib/modules/ |grep smp |head -1) fi if [ -z "$KVER" ]; then @@ -1806,11 +1818,12 @@ umount -R ${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: +KPKGDET=$(find_modulespackage $LIVE_ROOTDIR) if [ "$SL_ARCH" = "x86_64" -o "$SMP32" = "NO" ]; then - KGEN=$(ls --indicator-style=none ${LIVE_ROOTDIR}/var/log/packages/kernel*modules* |grep -v smp |head -1 |rev | cut -d- -f3 |tr _ - |rev) + KGEN=$(ls --indicator-style=none ${LIVE_ROOTDIR}/var/log/packages/kernel*${KPKGDET}* |grep -v smp |head -1 |rev | cut -d- -f3 |tr _ - |rev) KVER=$(ls --indicator-style=none ${LIVE_ROOTDIR}/lib/modules/ |grep -v smp |head -1) else - KGEN=$(ls --indicator-style=none ${LIVE_ROOTDIR}/var/log/packages/kernel*modules* |grep smp |head -1 |rev | cut -d- -f3 |tr _ - |rev) + KGEN=$(ls --indicator-style=none ${LIVE_ROOTDIR}/var/log/packages/kernel*${KPKGDET}* |grep smp |head -1 |rev | cut -d- -f3 |tr _ - |rev) KVER=$(ls --indicator-style=none ${LIVE_ROOTDIR}/lib/modules/ |grep smp |head -1) fi @@ -3418,11 +3431,12 @@ mount --bind /sys ${LIVE_ROOTDIR}/sys mount --bind /dev ${LIVE_ROOTDIR}/dev # Determine the installed kernel version: +KPKGDET=$(find_modulespackage $LIVE_ROOTDIR) if [ "$SL_ARCH" = "x86_64" -o "$SMP32" = "NO" ]; then - KGEN=$(ls --indicator-style=none ${LIVE_ROOTDIR}/var/log/packages/kernel*modules* |grep -v smp |head -1 |rev | cut -d- -f3 |tr _ - |rev) + KGEN=$(ls --indicator-style=none ${LIVE_ROOTDIR}/var/log/packages/kernel*${KPKGDET}* |grep -v smp |head -1 |rev | cut -d- -f3 |tr _ - |rev) KVER=$(ls --indicator-style=none ${LIVE_ROOTDIR}/lib/modules/ |grep -v smp |head -1) else - KGEN=$(ls --indicator-style=none ${LIVE_ROOTDIR}/var/log/packages/kernel*modules* |grep smp |head -1 |rev | cut -d- -f3 |tr _ - |rev) + KGEN=$(ls --indicator-style=none ${LIVE_ROOTDIR}/var/log/packages/kernel*${KPKGDET}* |grep smp |head -1 |rev | cut -d- -f3 |tr _ - |rev) KVER=$(ls --indicator-style=none ${LIVE_ROOTDIR}/lib/modules/ |grep smp |head -1) fi |