Hi,

These two related init compatibility issues haven't seen any activity recently, so I've uploaded an NMU (delayed/14) to fix them in line with the patches already posted; in the case of the init script I simply reverted your commit removing it.

I attach my commits here, and I'll also be sending you an MR on salsa.

HTH,

Matthew
>From f6cb26bcc9b54d75f6e343019714cd905afe1cc1 Mon Sep 17 00:00:00 2001
From: Matthew Vernon <matt...@debian.org>
Date: Sun, 13 Sep 2020 12:42:23 +0100
Subject: [PATCH 1/3] Revert "Remove SysV init script" (closes: #964139)

This reverts commit 588ae1fa93a571b7da8f969052e5fd957e65e8c8.

This is to restore the SysV init script, which is useful for init
compatibility.
---
 ...ork-manager-config-connectivity-debian.postinst |  2 +-
 debian/network-manager.init                        | 92 ++++++++++++++++++++++
 debian/network-manager.links                       |  1 +
 debian/network-manager.maintscript                 |  1 -
 debian/network-manager.postinst                    |  3 -
 5 files changed, 94 insertions(+), 5 deletions(-)
 create mode 100644 debian/network-manager.init
 create mode 100644 debian/network-manager.links

diff --git a/debian/network-manager-config-connectivity-debian.postinst b/debian/network-manager-config-connectivity-debian.postinst
index 576f8898..eb087aa4 100644
--- a/debian/network-manager-config-connectivity-debian.postinst
+++ b/debian/network-manager-config-connectivity-debian.postinst
@@ -3,7 +3,7 @@
 set -e
 
 if [ "$1" = configure ]; then
-    nmcli general reload 2>/dev/null || true
+    invoke-rc.d network-manager force-reload || true
 fi
 
 #DEBHELPER#
diff --git a/debian/network-manager.init b/debian/network-manager.init
new file mode 100644
index 00000000..ac9c584c
--- /dev/null
+++ b/debian/network-manager.init
@@ -0,0 +1,92 @@
+#! /bin/sh
+### BEGIN INIT INFO
+# Provides:          network-manager
+# Required-Start:    $remote_fs dbus udev
+# Required-Stop:     $remote_fs dbus udev
+# Should-Start:	     $syslog
+# Should-Stop:       $syslog
+# Default-Start:     2 3 4 5
+# Default-Stop:      0 1 6
+# Short-Description: network connection manager
+# Description:       Daemon for automatically switching network 
+#		     connections to the best available connection.
+### END INIT INFO
+
+PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
+DESC="network connection manager"
+NAME="NetworkManager"
+
+DAEMON=/usr/sbin/$NAME
+
+PIDFILE=/run/$NAME/$NAME.pid
+
+SCRIPTNAME=/etc/init.d/network-manager
+
+# Gracefully exit if the package has been removed.
+test -x $DAEMON || exit 0
+
+. /lib/lsb/init-functions
+
+test -f /etc/default/NetworkManager && . /etc/default/NetworkManager
+
+#
+#	Function that starts the daemon/service.
+#
+d_start() {
+	start-stop-daemon --start --quiet --pidfile $PIDFILE \
+		--exec $DAEMON -- $DAEMON_OPTS
+}
+
+#
+#	Function that stops the daemon/service.
+#
+d_stop() {
+	start-stop-daemon --stop --retry 5 --quiet --pidfile $PIDFILE \
+		--exec $DAEMON
+}
+
+d_reload() {
+	start-stop-daemon --stop --signal HUP --quiet --pidfile $PIDFILE \
+		--exec $DAEMON
+}
+
+case "$1" in
+  start)
+	log_daemon_msg "Starting $DESC" "$NAME"
+	d_start
+	case "$?" in
+		0) log_end_msg 0 ;;
+		1) log_progress_msg "already started"
+		   log_end_msg 0 ;;
+		*) log_end_msg 1 ;;
+	esac
+	;;
+  stop)
+	log_daemon_msg "Stopping $DESC" "$NAME"
+	d_stop
+	case "$?" in
+		0) log_end_msg 0 ;;
+		1) log_progress_msg "already stopped"
+		   log_end_msg 0 ;;
+		*) log_end_msg 1 ;;
+	esac
+	;;
+  reload|force-reload)
+	log_daemon_msg "Reloading $DESC" "$NAME"
+	d_reload
+	log_end_msg $?
+	;;
+  restart)
+	$0 stop
+	$0 start
+	;;
+  status)
+	status_of_proc -p $PIDFILE $DAEMON $NAME && exit 0 || exit $?
+	;;
+  *)
+	echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload|status}" >&2
+	exit 1
+	;;
+esac
+
+exit 0
diff --git a/debian/network-manager.links b/debian/network-manager.links
new file mode 100644
index 00000000..d32ad80e
--- /dev/null
+++ b/debian/network-manager.links
@@ -0,0 +1 @@
+lib/systemd/system/NetworkManager.service lib/systemd/system/network-manager.service
diff --git a/debian/network-manager.maintscript b/debian/network-manager.maintscript
index bb7498aa..673456df 100644
--- a/debian/network-manager.maintscript
+++ b/debian/network-manager.maintscript
@@ -1,4 +1,3 @@
 mv_conffile /etc/NetworkManager/dispatcher.d/01ifupdown /etc/NetworkManager/dispatcher.d/01-ifupdown 1.8.0-5~
 rm_conffile /etc/dbus-1/system.d/nm-dispatcher.conf 1.14.4-4~
 rm_conffile /etc/dbus-1/system.d/org.freedesktop.NetworkManager.conf 1.14.4-4~
-rm_conffile /etc/init.d/network-manager 1.25.91-1~
diff --git a/debian/network-manager.postinst b/debian/network-manager.postinst
index 2996afcc..f62edf2a 100644
--- a/debian/network-manager.postinst
+++ b/debian/network-manager.postinst
@@ -53,9 +53,6 @@ case "$1" in
                 chmod 0600 /var/lib/NetworkManager/secret_key
             fi
         fi
-        if dpkg --compare-versions "$2" lt-nl "1.25.91-1"; then
-            update-rc.d -f network-manager remove || true
-        fi
         ;;
 
     abort-upgrade|abort-deconfigure|abort-remove)
-- 
2.11.0

>From 3c83a9ffaf9d93ebecf4c03b7751986ac03ee7a2 Mon Sep 17 00:00:00 2001
From: Matthew Vernon <matt...@debian.org>
Date: Sun, 13 Sep 2020 12:47:28 +0100
Subject: [PATCH 2/3] Use virtual logind package (Closes: #921012)

This is another init compatibility fix; thanks to Mark Hindley
<m...@hindley.org.uk> for the original patch
---
 debian/control | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/debian/control b/debian/control
index 377f8779..03b81935 100644
--- a/debian/control
+++ b/debian/control
@@ -55,7 +55,7 @@ Depends: ${shlibs:Depends},
          dbus,
          udev,
          adduser,
-         libpam-systemd,
+         default-logind | logind,
          policykit-1
 Recommends: ppp,
             dnsmasq-base,
-- 
2.11.0

>From 0cfb2bf832e40a7d1d20a7bd75136ddfcf02dd2f Mon Sep 17 00:00:00 2001
From: Matthew Vernon <matt...@debian.org>
Date: Sun, 13 Sep 2020 12:49:18 +0100
Subject: [PATCH 3/3] Changelog for 1.26.2-1.1

---
 debian/changelog | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 248c1457..7f87ef50 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+network-manager (1.26.2-1.1) unstable; urgency=medium
+
+  * Init compatibility NMU
+  * Restore SysV init script (Closes: #964139)
+  * Use virtual logind package (Closes: #921012)
+
+ -- Matthew Vernon <matt...@debian.org>  Sun, 13 Sep 2020 12:48:25 +0100
+
 network-manager (1.26.2-1) unstable; urgency=medium
 
   * New upstream version 1.26.2
-- 
2.11.0

Reply via email to