This commit is contained in:
CaretakerMushroom 2026-01-29 03:09:43 +00:00 committed by GitHub
commit ec7a37f1d3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 12 additions and 4 deletions

View file

@ -153,7 +153,7 @@
# Generic
if [ -e /etc/os-release ]; then
OS_FULLNAME=$(awk -F= '/^PRETTY_NAME=/ {print substr($2,2,length($2)-2)}' /etc/os-release)
OS_ID=$(grep "^ID=" /etc/os-release | awk -F= '{print $2}' | tr -d '"')
OS_ID=$(grep "^ID=" /etc/os-release | awk -F= '{print $2}' | tr -d "'\"" )
if [ -n "${OS_ID}" ]; then
case ${OS_ID} in
"almalinux")

View file

@ -514,7 +514,15 @@
NFTABLES_ACTIVE=1
Report "firewall_software[]=nftables"
else
LogText "Result: no nftables kernel module found"
FIND=$(${GREPBINARY} -ioP "(?<=/)nf*_tables(?=\.ko)" "/lib/modules/$(uname -r)/modules.builtin");
if [ -n "${FIND}" ]; then
LogText "Result: found nftables kernel module"
FIREWALL_ACTIVE=1
NFTABLES_ACTIVE=1
Report "firewall_software[]=nftables"
else
LogText "Result: no nftables kernel module found"
fi
fi
fi
#

View file

@ -748,7 +748,7 @@
# Extra current kernel version and replace dashes to allow numeric ${SORTBINARY} later on
MYKERNEL=$(${UNAMEBINARY} -r | ${SEDBINARY} 's/\.[a-z].*.//g' | ${SEDBINARY} 's/-[a-z].*.//g' | ${SEDBINARY} 's/-/./g')
LogText "Result: using ${MYKERNEL} as my kernel version (stripped)"
FIND=$(ls ${ROOTDIR}boot/vmlinuz* 2> /dev/null)
FIND=$(${FINDBINARY} /boot/ /boot/EFI/Gentoo/ -maxdepth 1 -name "vmlinuz*")
if [ -n "${FIND}" ]; then
for ITEM in ${FIND}; do
LogText "Result: found ${ITEM}"
@ -757,7 +757,7 @@
# Ignore rescue images. Remove generic. and huge. for Slackware machines
# TODO: see if this can be simplified using ls -v sorting
LogText "Action: checking relevant kernels"
KERNELS=$(${LSBINARY} /boot/vmlinuz* | ${GREPBINARY} -v rescue | ${SEDBINARY} 's/vmlinuz-//' | ${SEDBINARY} 's/generic.//' | ${SEDBINARY} 's/huge.//' | ${SEDBINARY} 's/\.[a-z].*.//g' | ${SEDBINARY} 's/-[a-z].*.//g' | ${SEDBINARY} 's./boot/..' | ${SEDBINARY} 's/-/./g' | ${SORTBINARY} -n -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 -k6,6 -t \.)
KERNELS=$(${FINDBINARY} /boot/ /boot/EFI/Gentoo/ -maxdepth 1 -name "vmlinuz*" | ${GREPBINARY} -v rescue | ${SEDBINARY} 's/vmlinuz-//' | ${SEDBINARY} 's/generic.//' | ${SEDBINARY} 's/huge.//' | ${SEDBINARY} 's/\.[a-z].*.//g' | ${SEDBINARY} 's/-[a-z].*.//g' | ${SEDBINARY} 's./boot/..' | ${SEDBINARY} 's.EFI/Gentoo/..' | ${SEDBINARY} 's/-/./g' | ${SORTBINARY} -n -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 -k6,6 -t \.)
KERNELS_ONE_LINE=$(${ECHOCMD} ${KERNELS} | ${TRBINARY} '\n' ' ')
LogText "Output: ${KERNELS_ONE_LINE}"
elif [ ! "$(ls ${ROOTDIR}boot/kernel* 2> /dev/null)" = "" ]; then