4 version
=@abiname@@localversion@
5 image_path
=/boot
/@image-stem@
-$version
7 rm -f /lib
/modules
/$version/.fresh-install
9 if [ "$1" != upgrade
] && command -v linux-update-symlinks
>/dev
/null
; then
10 linux-update-symlinks remove
$version $image_path
13 if [ -d /etc
/kernel
/postrm.d
]; then
14 # We cannot trigger ourselves as at the end of this we will no longer
15 # exist and can no longer respond to the trigger. The trigger would
16 # then become lost. Therefore we clear any pending trigger and apply
18 if [ -f /usr
/lib
/linux
/triggers
/$version ]; then
19 echo "$0 ... removing pending trigger"
20 rm -f /usr
/lib
/linux
/triggers
/$version
21 rmdir --ignore-fail-on-non-empty /usr
/lib
/linux
/triggers
23 DEB_MAINT_PARAMS
="$*" run-parts
--report --exit-on-error --arg=$version \
24 --arg=$image_path /etc
/kernel
/postrm.d
27 if [ "$1" = purge
]; then
28 for extra_file
in modules.dep modules.isapnpmap modules.pcimap \
29 modules.usbmap modules.parportmap \
30 modules.generic_string modules.ieee1394map \
31 modules.ieee1394map modules.pnpbiosmap \
32 modules.
alias modules.ccwmap modules.inputmap \
33 modules.symbols modules.ofmap \
34 modules.seriomap modules.\
*.bin \
35 modules.softdep modules.devname
; do
36 eval rm -f /lib
/modules
/$version/$extra_file
38 rmdir /lib
/modules
/$version || true