Merge pull request #41 from madaidan/system.map

Check for more locations of System.map
This commit is contained in:
Patrick Schleizer 2019-12-08 06:21:44 +00:00 committed by GitHub
commit a78a7e5571
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -5,8 +5,10 @@
shopt -s nullglob
system_map_location="/boot/System.map* /usr/src/*/System.map* /lib/modules/*/*/System.map* /System.map*"
counter=0
for filename in /boot/System.map* ; do
for filename in ${system_map_location} ; do
counter=$(( counter + 1 ))
done
@ -15,7 +17,7 @@ if [ "$counter" -ge "1" ]; then
fi
## Removes the System.map files as they are only used for debugging or malware.
for filename in /boot/System.map* ; do
for filename in ${system_map_location} ; do
if [ -f "${filename}" ]; then
rm --verbose --force "${filename}"
fi