aboutsummaryrefslogtreecommitdiffstats
path: root/make_slackware_live.sh
diff options
context:
space:
mode:
author Eric Hameleers <alien@slackware.com>2024-09-14 12:16:40 +0200
committer Eric Hameleers <alien@slackware.com>2024-09-14 12:16:40 +0200
commitfa8902a8cfcfe7401a7dfb3c3b7756239f0a87fa (patch)
tree3bc27b8932c8330da10aa01df045f1e1c63d077e /make_slackware_live.sh
parent9203a0bf28b4650c50c52eb75659f3e94731d614 (diff)
downloadliveslak-fa8902a8cfcfe7401a7dfb3c3b7756239f0a87fa.tar.gz
liveslak-fa8902a8cfcfe7401a7dfb3c3b7756239f0a87fa.tar.xz
Deal with change in kernel packages as per Fri Sep 13 01:32:33 UTC 2024
The kernel-huge package is gone. So is kernel-moduules... because all of the kernel modules are now included in the kernel-generic package.
Diffstat (limited to '')
-rwxr-xr-xmake_slackware_live.sh26
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