From e086efaff80ff61d79d258b830aa89cb91ec2398 Mon Sep 17 00:00:00 2001 From: "Rick Farina (Zero_Chaos)" Date: Thu, 23 Jan 2025 17:03:25 -0500 Subject: [PATCH] pentoo-updater: warn for too many kernel modules --- scripts/pentoo-updater.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/pentoo-updater.sh b/scripts/pentoo-updater.sh index ac9886d26..4fd9abad8 100755 --- a/scripts/pentoo-updater.sh +++ b/scripts/pentoo-updater.sh @@ -852,6 +852,10 @@ umount_boot if [ "$(find /usr/src/ -mindepth 1 -maxdepth 1 -type d | grep -c '/usr/src/linux-*')" -gt 2 ]; then printf 'Found more than two sets of kernel sources, you may wish to manually clean out the old ones in "/usr/src/linux-*".\n' fi +# Warn users who have way too many modules +if [ "$(find /lib/modules/ -mindepth 1 -maxdepth 1 -type d | grep -c '/lib/modules/')" -gt 2 ]; then + printf 'Found more than two sets of kernel modules, you may wish to manually clean out the old ones in "/lib/modules/".\n' +fi exit_code="0" if [ "${UNSAFE_BOOT}" = "1" ]; then