diff options
author | Michael Biebl <biebl@debian.org> | 2017-06-17 20:58:14 +0200 |
---|---|---|
committer | Michael Biebl <biebl@debian.org> | 2017-06-17 21:02:19 +0200 |
commit | bfe57e5fbd9cea476af46baece1c83c1b9cdd631 (patch) | |
tree | de45fe78cd6317a1abfe3c5482f3bb1e27aaa722 | |
parent | b53658e4cedc1c60f05c9840a54435ca84dc17e0 (diff) |
Switch runstatedir from /var/run to /run
Update existing /etc/resolv.conf symlinks accordingly.
Closes: #860045
-rw-r--r-- | debian/network-manager.init | 2 | ||||
-rw-r--r-- | debian/network-manager.postinst | 7 | ||||
-rw-r--r-- | debian/network-manager.postrm | 2 | ||||
-rwxr-xr-x | debian/rules | 1 |
4 files changed, 10 insertions, 2 deletions
diff --git a/debian/network-manager.init b/debian/network-manager.init index c7bc1f559..ac9c584c8 100644 --- a/debian/network-manager.init +++ b/debian/network-manager.init @@ -18,7 +18,7 @@ NAME="NetworkManager" DAEMON=/usr/sbin/$NAME -PIDFILE=/var/run/$NAME/$NAME.pid +PIDFILE=/run/$NAME/$NAME.pid SCRIPTNAME=/etc/init.d/network-manager diff --git a/debian/network-manager.postinst b/debian/network-manager.postinst index 38539e637..0f95087f8 100644 --- a/debian/network-manager.postinst +++ b/debian/network-manager.postinst @@ -37,6 +37,13 @@ case "$1" in echo "" 1>&2 fi fi + + # Fix up existing /etc/resolv.conf symlinks after the migration to /run + if dpkg --compare-versions "$2" lt-nl "1.8.0-4"; then + if [ "$(readlink /etc/resolv.conf)" = /var/run/NetworkManager/resolv.conf ] ; then + ln -sf /run/NetworkManager/resolv.conf /etc/resolv.conf + fi + fi ;; abort-upgrade|abort-deconfigure|abort-remove) diff --git a/debian/network-manager.postrm b/debian/network-manager.postrm index f0d9188fc..3d831703d 100644 --- a/debian/network-manager.postrm +++ b/debian/network-manager.postrm @@ -25,7 +25,7 @@ case "$1" in # 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 + if [ "$(readlink /etc/resolv.conf)" = /run/NetworkManager/resolv.conf ] ; then rm -f /etc/resolv.conf touch /etc/resolv.conf fi diff --git a/debian/rules b/debian/rules index cdc24319a..c912aacfb 100755 --- a/debian/rules +++ b/debian/rules @@ -18,6 +18,7 @@ override_dh_autoreconf: override_dh_auto_configure: dh_auto_configure -- \ --libexecdir=/usr/lib/NetworkManager \ + --runstatedir=/run \ --with-pppd-plugin-dir=$(PPPD_PLUGIN_DIR) \ --with-pppd=/usr/sbin/pppd \ --with-resolvconf=/sbin/resolvconf \ |