Remove obsolete image symlinks in /boot
[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
12 # remove old-named config files
13 dpkg-maintscript-helper rm_conffile \
14   /etc/kernel/postinst.d/zz-lilo  1:22.8-10 lilo -- "$@"
15
16 dpkg-maintscript-helper rm_conffile \
17   /etc/kernel/postrm.d/zz-lilo    1:22.8-10 lilo -- "$@"
18
19 dpkg-maintscript-helper rm_conffile \
20   /etc/kernel/postinst.d/zz-lilo  1:22.8-10 lilo -- "$@"
21
22 dpkg-maintscript-helper rm_conffile \
23   /etc/initramfs/post-update.d/lilo  1:22.8-10 lilo -- "$@"
24
25
26 # targets: purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear
27
28 case "$1" in
29         purge)
30                 test -f ${CONF} && mv ${CONF} ${CONF}_backup
31                 test -f ${MMAP} && rm -f ${MMAP}
32         ;;
33     remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
34                 for i in ${BMPS}; do
35                         rm -f /boot/${i}.bmp /boot/${i}.dat;
36                 done
37     ;;
38         *)
39                 echo "postrm called with unknown argument \`$1'" >&2
40                 exit 1
41         ;;
42 esac
43
44 # dh_installdeb will replace this with shell code automatically
45 # generated by other debhelper scripts.
46
47 #DEBHELPER#
48
49 exit 0