[Pkg-utopia-commits] r230 - packages/networkmanager/trunk/debian

Thom May thom@costa.debian.org
Sat, 18 Jun 2005 10:48:25 +0000


Author: thom
Date: 2005-06-18 10:48:23 +0000 (Sat, 18 Jun 2005)
New Revision: 230

Added:
   packages/networkmanager/trunk/debian/network-manager.postinst
Modified:
   packages/networkmanager/trunk/debian/changelog
   packages/networkmanager/trunk/debian/control
   packages/networkmanager/trunk/debian/network-manager.dbus-event
   packages/networkmanager/trunk/debian/rules
Log:
update event script and restart dbus in postinst

Modified: packages/networkmanager/trunk/debian/changelog
===================================================================
--- packages/networkmanager/trunk/debian/changelog	2005-06-18 10:26:05 UTC (rev 229)
+++ packages/networkmanager/trunk/debian/changelog	2005-06-18 10:48:23 UTC (rev 230)
@@ -5,6 +5,8 @@
     (Ubuntu: #11905)
   * Ensure /var/lib/NetworkManager is created with the correct permisions
     (Ubuntu: #11904)
+  * Rename dbus event script to correct name and restart dbus in postinst
+  * Depend on lsb-base and use log_*_msg in event script
 
  -- Thom May <thom@ubuntu.com>  Sat, 18 Jun 2005 11:22:49 +0100
 

Modified: packages/networkmanager/trunk/debian/control
===================================================================
--- packages/networkmanager/trunk/debian/control	2005-06-18 10:26:05 UTC (rev 229)
+++ packages/networkmanager/trunk/debian/control	2005-06-18 10:48:23 UTC (rev 230)
@@ -7,7 +7,7 @@
 
 Package: network-manager
 Architecture: any
-Depends: ${shlibs:Depends}, ${misc:Depends}, iproute, iputils-arping, dhcdbd, bind9, resolvconf
+Depends: ${shlibs:Depends}, ${misc:Depends}, iproute, iputils-arping, dhcdbd, bind9, resolvconf, lsb-base (>= 2.0-6)
 #Conflicts: arping, ifplugd, pump
 Description: network management framework daemon
  NetworkManager attempts to keep an active network connection available at all

Modified: packages/networkmanager/trunk/debian/network-manager.dbus-event
===================================================================
--- packages/networkmanager/trunk/debian/network-manager.dbus-event	2005-06-18 10:26:05 UTC (rev 229)
+++ packages/networkmanager/trunk/debian/network-manager.dbus-event	2005-06-18 10:48:23 UTC (rev 230)
@@ -28,6 +28,11 @@
 # We need /sbin/ip
 [ -x /sbin/ip ] || exit 1
 
+. /lib/lsb/init-functions
+
+test -f /etc/default/rcS && . /etc/default/rcS
+test -f /etc/default/NetworkManager && . /etc/default/NetworkManager
+
 #
 #	Function that starts the daemon/service.
 #
@@ -35,39 +40,38 @@
         test -d /var/lib/NetworkManager || mkdir -p /var/lib/NetworkManager
         chown -R bind:bind /var/lib/NetworkManager
         chmod 755 /var/lib/NetworkManager
+
+        log_begin_msg "Starting $DESC: "
 	start-stop-daemon --start --quiet --pidfile $PIDFILE \
 		--user $USER --exec $DAEMON -- $DAEMON_OPTS
+        log_end_msg $?
 }
 
 #
 #	Function that stops the daemon/service.
 #
 d_stop() {
+        log_begin_msg "Stopping $DESC: "
 	start-stop-daemon --stop --quiet --pidfile $PIDFILE \
 		 --oknodo --user $USER --exec $DAEMON
+        log_end_msg $?
 }
 
 
 case "$1" in
   start)
-	echo -n "Starting $DESC: $NAME"
 	d_start
-	echo "."
 	;;
   stop)
-	echo -n "Stopping $DESC: $NAME"
 	d_stop
-	echo "."
 	;;
   restart|force-reload)
-	echo -n "Restarting $DESC: $NAME"
 	d_stop
 	sleep 1
 	d_start
-	echo "."
 	;;
   *)
-	echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
+	log_success_msg "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
 	exit 1
 	;;
 esac

Added: packages/networkmanager/trunk/debian/network-manager.postinst
===================================================================
--- packages/networkmanager/trunk/debian/network-manager.postinst	2005-06-18 10:26:05 UTC (rev 229)
+++ packages/networkmanager/trunk/debian/network-manager.postinst	2005-06-18 10:48:23 UTC (rev 230)
@@ -0,0 +1,16 @@
+#/bin/sh
+set -e
+
+case "$1" in
+  configure)
+    if [ -x /etc/dbus-1/event.d/zz99NetworkManager ]; then
+      mv /etc/dbus-1/event.d/zz99NetworkManager /etc/dbus-1/event.d/zz99NetworkManager.disabled
+    fi
+
+    if [ -x /etc/init.d/dbus-1 ]; then
+      invoke-rc.d dbus-1 restart || true
+    fi
+    ;;
+esac
+
+#DEBHELPER#

Modified: packages/networkmanager/trunk/debian/rules
===================================================================
--- packages/networkmanager/trunk/debian/rules	2005-06-18 10:26:05 UTC (rev 229)
+++ packages/networkmanager/trunk/debian/rules	2005-06-18 10:48:23 UTC (rev 230)
@@ -86,7 +86,7 @@
 	# debian/tmp.
 	$(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
 
-	install -m 755 debian/network-manager.dbus-event debian/network-manager/etc/dbus-1/event.d/zz99NetworkManager
+	install -m 755 debian/network-manager.dbus-event debian/network-manager/etc/dbus-1/event.d/25NetworkManager
 	install -m 644 debian/nm-applet.conf debian/network-manager/etc/dbus-1/system.d/nm-applet.conf
 	install -m 644 debian/network-manager.dbus-conf debian/network-manager/etc/dbus-1/system.d/NetworkManager.conf
 	chown -R bind:bind debian/network-manager/var/lib/NetworkManager