[Pkg-utopia-maintainers] Bug#860045: Bug#860045: Bug#860045: Please don't use /var/run/$foo in network-manager anymore
Michael Biebl
biebl at debian.org
Wed Apr 12 00:56:00 UTC 2017
Thanks for the patch. A few questions/comments
Am 11.04.2017 um 21:59 schrieb Alf Gaida:
> diff --git a/debian/changelog b/debian/changelog
> index e93e091..efc12e9 100644
> --- a/debian/changelog
> +++ b/debian/changelog
> @@ -1,3 +1,12 @@
> +network-manager (1.6.2-3.3) unstable; urgency=medium
> +
> + [ Alf Gaida ]
> + * run pid in /run/NM instead of /var/run/NM
Please use the actual path, not some non-existing abbreviation.
> + * remove a symlink to /var/run in preinst
> + * configure with runstatedir=/run (Closes: #860045)
> +
> + -- Alf Gaida <agaida at siduction.org> Tue, 11 Apr 2017 21:50:52 +0200
> +
> network-manager (1.6.2-3) unstable; urgency=medium
>
> * device/wifi: block autoconnect while scanning is in progress.
> diff --git a/debian/network-manager.init b/debian/network-manager.init
> index b21c40f..f7aecff 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 bcb634d..a72383b 100644
> --- a/debian/network-manager.postinst
> +++ b/debian/network-manager.postinst
> @@ -28,7 +28,7 @@ case "$1" in
> if [ -d /run/systemd/system ] && \
> [ -f /var/run/NetworkManager/NetworkManager.pid ]; then
> start-stop-daemon --stop --retry 5 --quiet --exec /usr/sbin/NetworkManager \
> - --pidfile /var/run/NetworkManager/NetworkManager.pid || true
> + --pidfile /run/NetworkManager/NetworkManager.pid || true
> fi
> fi
This is upgrade code from pre-jessie. This can be dropped.
>
> diff --git a/debian/network-manager.postrm b/debian/network-manager.postrm
> index f0d9188..3d83170 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
We should probably check for both paths here, for upgrade safety, i.e
whether /etc/resolv.conf points to the old *or* new path.
> rm -f /etc/resolv.conf
> touch /etc/resolv.conf
> fi
> diff --git a/debian/network-manager.preinst b/debian/network-manager.preinst
> index 9fff61d..b4c8a05 100644
> --- a/debian/network-manager.preinst
> +++ b/debian/network-manager.preinst
> @@ -45,6 +45,11 @@ case "$1" in
> if dpkg --compare-versions "$2" lt "1.2.2-2"; then
> deb-systemd-helper purge NetworkManager-wait-online.service
> fi
> +
> + # Delete a symlink that points to /var/run
> + if [ "$(readlink /etc/resolv.conf)" = /var/run/NetworkManager/resolv.conf ] ; then
> + rm -f /etc/resolv.conf
> + fi
Why is that necessary? This appears to be a risky change with no clear
explanation why it's needed.
--
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-utopia-maintainers/attachments/20170412/c5e38ca0/attachment.sig>
More information about the Pkg-utopia-maintainers
mailing list