/usr/share/kernel-common/examples/etc/kernel/header_prerm.d/link is in kernel-common 13.018+nmu1.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | #! /bin/bash
version=$1
if [ -n "$DEB_MAINT_PARAMS" ]; then
eval set -- "$DEB_MAINT_PARAMS"
if [ -z "$1" ] || [ "$1" != "remove" ]; then
exit 0;
fi
fi
# passing the kernel version is required
[ -z "$version" ] && exit 1
HEADERDIR=/usr/src/linux-headers-$version
test -d $HEADERDIR || exit 0
# Make sure the asm link is gone
if [ -L $HEADERDIR/include/asm ]; then
rm $HEADERDIR/include/asm
fi
exit 0
|