mirror of
https://git.proxmox.com/git/mirror_ifupdown2
synced 2025-08-16 15:09:11 +00:00
debian: postinst: remove diversion after upgrade from stretch
closes: #919443 Reported-by: Andreas Beckmann <anbe@debian.org> Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
This commit is contained in:
parent
9f98f3604e
commit
0aa3d31930
7
debian/changelog
vendored
7
debian/changelog
vendored
@ -1,3 +1,10 @@
|
||||
ifupdown2 (1.2.5-1) unstable; urgency=medium
|
||||
|
||||
* Fix: debian: postinst: remove diversion after upgrade from stretch
|
||||
(closes: #919443)
|
||||
|
||||
-- Julien Fortin <julien@cumulusnetworks.com> Wed, 16 Jan 2019 23:42:42 +0800
|
||||
|
||||
ifupdown2 (1.2.4-1) unstable; urgency=medium
|
||||
|
||||
* Fix: statemanager directory path customization via ifupdown2.conf
|
||||
|
23
debian/ifupdown2.postinst
vendored
23
debian/ifupdown2.postinst
vendored
@ -63,12 +63,35 @@ process_udev()
|
||||
fi
|
||||
}
|
||||
|
||||
# restore file if we diverted it on install/upgrade
|
||||
_postinst_remove_diverts()
|
||||
{
|
||||
diversions=$(LC_ALL=C.UTF-8 dpkg-divert --list | grep "^diversion of $1 .* by ifupdown2$" | wc -l 2> /dev/null)
|
||||
if [ $diversions -gt 0 ];
|
||||
then
|
||||
dpkg-divert --remove --package ifupdown2 --rename $1
|
||||
fi
|
||||
}
|
||||
|
||||
postinst_remove_diverts()
|
||||
{
|
||||
for filename in ifup ifdown ifquery ifreload
|
||||
do
|
||||
_postinst_remove_diverts "/sbin/$filename"
|
||||
_postinst_remove_diverts "/usr/share/bash-completion/completions/$filename"
|
||||
_postinst_remove_diverts "/etc/bash_completion.d/$filename"
|
||||
_postinst_remove_diverts "/usr/share/man/man8/$filename.8.gz"
|
||||
done
|
||||
_postinst_remove_diverts "/usr/share/man/man5/interfaces.5.gz"
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
configure)
|
||||
fix_dhclient_file_with_space
|
||||
process_etc_network_interfaces
|
||||
process_udev
|
||||
chmod +x /usr/share/ifupdown2/__main__.py
|
||||
postinst_remove_diverts
|
||||
;;
|
||||
|
||||
abort-upgrade|abort-remove|abort-deconfigure)
|
||||
|
Loading…
Reference in New Issue
Block a user