pentoo-updater: warn for too many kernel modules

This commit is contained in:
Rick Farina (Zero_Chaos) 2025-01-23 17:03:25 -05:00
parent 8dc2d5d8ba
commit e086efaff8
No known key found for this signature in database
GPG key ID: A29433C0AA431DDC

View file

@ -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