1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58
|
#!/bin/sh
set -e
diversion_added_ver=0.14
case "$1" in
purge)
if which ucfq >/dev/null ; then
for cf in $(ucfq -w orphan-sysvinit-scripts | cut -f 1 -d ':') ; do
for ext in '~' '%' .bak .ucf-new .ucf-old .ucf-dist; do
rm -f "${cf}$ext"
done
rm -f "$cf"
if which ucf >/dev/null ; then
ucf --purge "$cf"
fi
if which ucfr >/dev/null ; then
ucfr --purge orphan-sysvinit-scripts "$cf"
fi
update-rc.d "${cf#/etc/init.d/}" remove >/dev/null
done
fi
;;
upgrade)
if which ucfq >/dev/null ; then
if [ -e /etc/init.d/iwd ]; then
if ucfq -w /etc/init.d/iwd | grep -q orphan-sysvinit-scripts
then
if which ucf >/dev/null ; then
ucf --purge /etc/init.d/iwd
fi
if which ucfr >/dev/null ; then
ucfr --purge orphan-sysvinit-scripts /etc/init.d/iwd
fi
fi
fi
fi
;;
esac
if [ remove = "$1" ] || [ abort-install = "$1" ] || [ disappear = "$1" ] ||
{
{ [ abort-upgrade = "$1" ] || [ upgrade = "$1" ]; } &&
dpkg --compare-versions "$2" lt "$diversion_added_ver";
}; then
dpkg-divert --package orphan-sysvinit-scripts --remove --rename \
--divert /usr/lib/rsyslog/rsyslog-rotate.real \
/usr/lib/rsyslog/rsyslog-rotate
fi
# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.
#DEBHELPER#
exit 0
|