From 31bf695cc438fa57869ed7fe5b6199b7fd4ce71c Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Sun, 7 Aug 2016 13:36:56 +0200 Subject: Replace /etc/resolv.conf symlink with an empty file on package removal Removing the symlink is a hint to other packages that NetworkManager is no longer controlling the file. Closes: #826366 --- debian/changelog | 3 +++ debian/network-manager.postrm | 9 +++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 14bef944..928115bb 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,6 +3,9 @@ network-manager (1.2.4-1) UNRELEASED; urgency=medium * New upstream release. * Rebase patches. * Update symbols file for libnm0. + * Replace /etc/resolv.conf symlink with an empty file on package removal + to signal other packages that NetworkManager is no longer controlling the + file. (Closes: #826366) -- Michael Biebl Wed, 03 Aug 2016 23:01:13 +0200 diff --git a/debian/network-manager.postrm b/debian/network-manager.postrm index ff5c49e7..f0d9188f 100644 --- a/debian/network-manager.postrm +++ b/debian/network-manager.postrm @@ -22,8 +22,13 @@ case "$1" in rm -rf /var/lib/NetworkManager ;; remove) - # Since we no longer run the ifblacklist_migrate.sh script - # we also don't need to clean up anymore afterwards. + # Replace /etc/resolv.conf symlink with an empty file on package + # removal to signal other packages that NetworkManager is no longer + # controlling the file. (See: #826366) + if [ "$(readlink /etc/resolv.conf)" = /var/run/NetworkManager/resolv.conf ] ; then + rm -f /etc/resolv.conf + touch /etc/resolv.conf + fi ;; upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) ;; -- cgit 1.3.0-6-gf8a5