Skip to content

Commit

Permalink
add hook etc/kernel/postinst.d/30_remove-system-map to remove system.map
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Patrick Schleizer committed Aug 14, 2019
1 parent f1d8cbc commit dbea7d1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions etc/kernel/postinst.d/30_remove-system-map
@@ -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
2 changes: 1 addition & 1 deletion usr/lib/security-misc/remove-system.map
Expand Up @@ -9,6 +9,6 @@ shopt -s nullglob
for filename in /boot/System.map-*
do
if [ -f "${filename}" ]; then
rm -f "${filename}"
rm --verbose --force "${filename}"
fi
done

0 comments on commit dbea7d1

Please sign in to comment.