This commit is contained in:
Patrick Schleizer 2019-11-05 01:59:19 -05:00
parent d6977becba
commit 2b5b06b602
No known key found for this signature in database
GPG Key ID: CB8D50BB77BB3C48

View File

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