X-Git-Url: https://git.rrq.au/?a=blobdiff_plain;f=debian%2Flilo.postrm;h=48396ba18bba19ebda3ac6de529e8e771eae79f2;hb=49e489f4c3e75e13f92bd14075cc5b8dd10f9cee;hp=255bcbe2b66d971f84acd1b3fcdbbd39234a9717;hpb=e54ace12fd683ce1f41b25ed66641e40b84212b0;p=rrq%2Fmaintain_lilo.git diff --git a/debian/lilo.postrm b/debian/lilo.postrm index 255bcbe..48396ba 100644 --- a/debian/lilo.postrm +++ b/debian/lilo.postrm @@ -1,18 +1,40 @@ -#!/bin/sh -e +#!/bin/sh +# postrm script lilo +# +# see: dh_installdeb(1) -#DEBHELPER# +set -e + +CONF="/etc/lilo.conf" +MMAP="/boot/map" +BMPS="coffee debian debian-de inside onlyblue tuxlogo debianlilo" +LNKS="sarge sid" -for i in sid.bmp sarge.bmp debianlilo.bmp coffee.bmp; do - rm -f /boot/$i; -done +# targets: purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear -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 - rm -f /usr/share/lilo/*.conf +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# -fi +exit 0