Bump Standards-Version
[rrq/maintain_lilo.git] / debian / lilo.postrm
1 #!/bin/sh
2 # postrm script lilo
3 #
4 # see: dh_installdeb(1)
5
6 set -e
7
8 CONF="/etc/lilo.conf"
9 MMAP="/boot/map"
10 BMPS="coffee debian debian-de inside onlyblue tuxlogo debianlilo"
11 LNKS="sarge sid"
12
13 # remove old-named config files
14 dpkg-maintscript-helper rm_conffile \
15   /etc/kernel/postinst.d/zz-lilo  1:22.8-10 lilo -- "$@"
16
17 dpkg-maintscript-helper rm_conffile \
18   /etc/kernel/postrm.d/zz-lilo    1:22.8-10 lilo -- "$@"
19
20 dpkg-maintscript-helper rm_conffile \
21   /etc/kernel/postinst.d/zz-lilo  1:22.8-10 lilo -- "$@"
22
23 dpkg-maintscript-helper rm_conffile \
24   /etc/initramfs/post-update.d/lilo  1:22.8-10 lilo -- "$@"
25
26
27 # targets: purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear
28
29 case "$1" in
30         purge)
31                 test -f ${CONF} && mv ${CONF} ${CONF}_backup
32                 test -f ${MMAP} && rm -f ${MMAP}
33         ;;
34     remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
35                 for i in ${BMPS}; do
36                         rm -f /boot/${i}.bmp /boot/${i}.dat;
37                 done
38                 # stay compatible with old lilo 22.8
39                 for i in ${LNKS}; do
40                         test -L /boot/${i}.bmp && rm -f /boot/${i}.bmp;
41                 done
42     ;;
43         *)
44                 echo "postrm called with unknown argument \`$1'" >&2
45                 exit 1
46         ;;
47 esac
48
49 # dh_installdeb will replace this with shell code automatically
50 # generated by other debhelper scripts.
51
52 #DEBHELPER#
53
54 exit 0