-if [ "$1" = "purge" ]; then
- rm -f /etc/lilo.conf /boot/map /boot/boot.b /boot/boot.0[0-9][0-9][0-9]
-
- if [ -d /usr/share/lilo ]; then
- rm -rf /usr/share/lilo
- fi
+case "$1" in
+ purge)
+ test -f ${CONF} && mv ${CONF} ${CONF}_backup
+ test -f ${MMAP} && rm -f ${MMAP}
+ ;;
+ remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
+ for i in ${BMPS}; do
+ rm -f /boot/${i}.bmp /boot/${i}.dat;
+ done
+ # stay compatible with old lilo 22.8
+ for i in ${LNKS}; do
+ test -L /boot/${i}.bmp && rm -f /boot/${i}.bmp;
+ done
+ ;;
+ *)
+ echo "postrm called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac