From: Joachim Wiedorn Date: Fri, 28 Jan 2011 23:40:50 +0000 (+0100) Subject: Use dpkg-maintscript-helper for old config files X-Git-Tag: debian/23.1-1^0 X-Git-Url: https://git.rrq.au/?a=commitdiff_plain;h=b4ab7f50627fa7e7388deab84c3e9e9b1a97542c;hp=3c6e0a9e0fdb7a72362cc9281319ea572a21bf28;p=rrq%2Fmaintain_lilo.git Use dpkg-maintscript-helper for old config files --- diff --git a/debian/changelog b/debian/changelog index f3c4c65..f626a6b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -43,7 +43,8 @@ lilo (1:23.1-1) unstable; urgency=low * Add new script update-lilo and its manual page. (Closes: #335084) * Add new script lilo-uuid-diskid for ID conversion and its manual page. - * Update scripts lilo.postinst, lilo.postrm, lilo.preinst. + * Update scripts lilo.postinst, lilo.postrm, lilo.preinst. Using + dpkg-maintscript-helper for preserving old modified hook scripts. * Add link creation for menu background sarge.bmp and sid.bmp for compatibility in file debian/lilo.postinst. * Remove hook scripts for kernel and initramfs and use upstream scripts. @@ -76,7 +77,7 @@ lilo (1:23.1-1) unstable; urgency=low - Diffs for NMUs already included. (Closes: #504267, #409663) - Remove old obsolete workaround (see bugreport 146350#25). - -- Joachim Wiedorn Tue, 18 Jan 2011 23:38:32 +0100 + -- Joachim Wiedorn Fri, 28 Jan 2011 22:51:10 +0100 lilo (1:22.8-10) unstable; urgency=low diff --git a/debian/control b/debian/control index ef768e7..cb5b695 100644 --- a/debian/control +++ b/debian/control @@ -13,6 +13,7 @@ Homepage: http://lilo.alioth.debian.org/ Package: lilo Architecture: amd64 i386 +Pre-Depends: dpkg (>= 1.15.7.2) Depends: mbr, ${shlibs:Depends}, ${misc:Depends} Suggests: lilo-doc Description: LInux LOader - the classic OS boot loader diff --git a/debian/lilo.postinst b/debian/lilo.postinst index 497398b..cc03366 100644 --- a/debian/lilo.postinst +++ b/debian/lilo.postinst @@ -11,6 +11,20 @@ if [ -f /usr/share/debconf/confmodule ]; then . /usr/share/debconf/confmodule fi +# remove old-named config files +dpkg-maintscript-helper rm_conffile \ + /etc/kernel/postinst.d/zz-lilo 1:22.8-10 lilo -- "$@" + +dpkg-maintscript-helper rm_conffile \ + /etc/kernel/postrm.d/zz-lilo 1:22.8-10 lilo -- "$@" + +dpkg-maintscript-helper rm_conffile \ + /etc/kernel/postinst.d/zz-lilo 1:22.8-10 lilo -- "$@" + +dpkg-maintscript-helper rm_conffile \ + /etc/initramfs/post-update.d/lilo 1:22.8-10 lilo -- "$@" + + # targets: configure|abort-upgrade|abort-remove|abort-deconfigure case "$1" in @@ -44,14 +58,6 @@ case "$1" in ln -s debian.bmp /boot/${i}.bmp done - # remove scripts of old lilo 22.8 if still exist - if test -f /etc/kernel/postinst.d/zz-lilo; then - rm -f /etc/kernel/postinst.d/zz-lilo; fi - if test -f /etc/kernel/postrm.d/zz-lilo; then - rm -f /etc/kernel/postrm.d/zz-lilo; fi - if test -f /etc/initramfs/post-update.d/lilo; then - rm -f /etc/initramfs/post-update.d/lilo; fi - # Nasty part to create network block devices if needed. Bug#235805. if [ `uname -r | sed -e 's/-.*//g' -ne 's/\(^[0-9]\{1\}\.[0-9]\{1,2\}\).*/\1/p'` = "2.6" ] && \ [ `uname -r | sed -e 's/-.*//g' -ne 's/.*\.\([0-9]\{1,3\}\).*/\1/p'` -ge "3" ]; then diff --git a/debian/lilo.postrm b/debian/lilo.postrm index 48396ba..edc59b9 100644 --- a/debian/lilo.postrm +++ b/debian/lilo.postrm @@ -10,6 +10,20 @@ MMAP="/boot/map" BMPS="coffee debian debian-de inside onlyblue tuxlogo debianlilo" LNKS="sarge sid" +# remove old-named config files +dpkg-maintscript-helper rm_conffile \ + /etc/kernel/postinst.d/zz-lilo 1:22.8-10 lilo -- "$@" + +dpkg-maintscript-helper rm_conffile \ + /etc/kernel/postrm.d/zz-lilo 1:22.8-10 lilo -- "$@" + +dpkg-maintscript-helper rm_conffile \ + /etc/kernel/postinst.d/zz-lilo 1:22.8-10 lilo -- "$@" + +dpkg-maintscript-helper rm_conffile \ + /etc/initramfs/post-update.d/lilo 1:22.8-10 lilo -- "$@" + + # targets: purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear case "$1" in diff --git a/debian/lilo.preinst b/debian/lilo.preinst index 556cbce..d852ad6 100644 --- a/debian/lilo.preinst +++ b/debian/lilo.preinst @@ -7,6 +7,20 @@ set -e BMPS="sarge sid" +# remove old-named config files +dpkg-maintscript-helper rm_conffile \ + /etc/kernel/postinst.d/zz-lilo 1:22.8-10 lilo -- "$@" + +dpkg-maintscript-helper rm_conffile \ + /etc/kernel/postrm.d/zz-lilo 1:22.8-10 lilo -- "$@" + +dpkg-maintscript-helper rm_conffile \ + /etc/kernel/postinst.d/zz-lilo 1:22.8-10 lilo -- "$@" + +dpkg-maintscript-helper rm_conffile \ + /etc/initramfs/post-update.d/lilo 1:22.8-10 lilo -- "$@" + + # targets: install|upgrade|abort-upgrade case "$1" in