diff --git a/usr/lib/security-misc/remove-system.map b/usr/lib/security-misc/remove-system.map index 5582493..f20dc3e 100755 --- a/usr/lib/security-misc/remove-system.map +++ b/usr/lib/security-misc/remove-system.map @@ -5,9 +5,22 @@ shopt -s nullglob +counter=0 +for filename in /boot/System.map-* ; do + counter=$(( counter + 1 )) +done + +if [ "$counter" -ge "1" ]; then + echo "Deleting system.map files..." +fi + ## Removes the System.map files as they are only used for debugging or malware. for filename in /boot/System.map-* ; do if [ -f "${filename}" ]; then rm --verbose --force "${filename}" fi done + +if [ "$counter" -ge "1" ]; then + echo "Success." +fi