mirror of
https://github.com/Kicksecure/security-misc.git
synced 2025-08-01 08:56:06 -04:00
add hook etc/kernel/postinst.d/30_remove-system-map to remove system.map
on kernel package upgrade; self-document this package: during upgrade the following will be written to stdout: Setting up linux-image-4.19.0-5-amd64 (4.19.37-5+deb10u2) ... /etc/kernel/postinst.d/30_remove-system-map: removed '/boot/System.map-4.19.0-5-amd64
This commit is contained in:
parent
f1d8cbc9fb
commit
dbea7d1511
2 changed files with 6 additions and 1 deletions
5
etc/kernel/postinst.d/30_remove-system-map
Executable file
5
etc/kernel/postinst.d/30_remove-system-map
Executable file
|
@ -0,0 +1,5 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
if test -x /usr/lib/security-misc/remove-system.map ; then
|
||||||
|
/usr/lib/security-misc/remove-system.map
|
||||||
|
fi
|
|
@ -9,6 +9,6 @@ shopt -s nullglob
|
||||||
for filename in /boot/System.map-*
|
for filename in /boot/System.map-*
|
||||||
do
|
do
|
||||||
if [ -f "${filename}" ]; then
|
if [ -f "${filename}" ]; then
|
||||||
rm -f "${filename}"
|
rm --verbose --force "${filename}"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue