[Pkg-utopia-commits] r767 - packages/unstable/dhcdbd/debian
Michael Biebl
mbiebl-guest at costa.debian.org
Tue Mar 28 13:23:39 UTC 2006
Author: mbiebl-guest
Date: 2006-03-28 13:23:39 +0000 (Tue, 28 Mar 2006)
New Revision: 767
Added:
packages/unstable/dhcdbd/debian/dhcdbd.dbus-event
Modified:
packages/unstable/dhcdbd/debian/changelog
packages/unstable/dhcdbd/debian/dhcdbd.postinst
packages/unstable/dhcdbd/debian/rules
Log:
Since NM 0.6.2 dhcdbd is not started automatically by NM anymore.
NM relies on dhcdbd already started by the init system.
Install 24dhcdbd to dbus-1/event.d and restart the service on configure.
Modified: packages/unstable/dhcdbd/debian/changelog
===================================================================
--- packages/unstable/dhcdbd/debian/changelog 2006-03-27 20:58:37 UTC (rev 766)
+++ packages/unstable/dhcdbd/debian/changelog 2006-03-28 13:23:39 UTC (rev 767)
@@ -1,3 +1,12 @@
+dhcdbd (1.12-2) unstable; urgency=low
+
+ * NetworkManager does not start dhcdbd on its own anymore since 0.6.2.
+ So install a init script in dbus-1/event.d/24dhcdbd which starts before
+ NetworkManager.
+ * Update postinst to restart the service on configure.
+
+ -- Michael Biebl <biebl at teco.edu> Tue, 28 Mar 2006 12:42:44 +0200
+
dhcdbd (1.12-1) unstable; urgency=low
* New upstream release
Added: packages/unstable/dhcdbd/debian/dhcdbd.dbus-event
===================================================================
--- packages/unstable/dhcdbd/debian/dhcdbd.dbus-event 2006-03-27 20:58:37 UTC (rev 766)
+++ packages/unstable/dhcdbd/debian/dhcdbd.dbus-event 2006-03-28 13:23:39 UTC (rev 767)
@@ -0,0 +1,66 @@
+#! /bin/sh
+#
+# DBUS aware dhcpd client
+#
+# Author: Michael Biebl <biebl at teco.edu>
+#
+
+set -e
+
+PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
+DESC="DBUS aware dhcp client"
+NAME="dhcdbd"
+DAEMON=/usr/sbin/$NAME
+DAEMON_OPTS=--system
+PIDFILE=/var/run/$NAME.pid
+SCRIPTNAME=/etc/dbus-1/event.d/24$NAME
+
+# Gracefully exit if the package has been removed.
+test -x $DAEMON || exit 0
+
+. /lib/lsb/init-functions
+
+#
+# Function that starts the daemon/service.
+#
+d_start() {
+ log_begin_msg "Starting $DESC: $NAME"
+
+ start-stop-daemon --start --quiet --pidfile $PIDFILE \
+ --exec $DAEMON -- $DAEMON_OPTS
+
+ log_end_msg $?
+}
+
+#
+# Function that stops the daemon/service.
+#
+d_stop() {
+ log_begin_msg "Stopping $DESC: $NAME"
+
+ start-stop-daemon --stop --quiet --pidfile $PIDFILE \
+ --oknodo --exec $DAEMON
+
+ log_end_msg $?
+}
+
+
+case "$1" in
+ start)
+ d_start
+ ;;
+ stop)
+ d_stop
+ ;;
+ restart|force-reload)
+ d_stop
+ sleep 1
+ d_start
+ ;;
+ *)
+ log_success_msg "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
+ exit 1
+ ;;
+esac
+
+exit 0
Modified: packages/unstable/dhcdbd/debian/dhcdbd.postinst
===================================================================
--- packages/unstable/dhcdbd/debian/dhcdbd.postinst 2006-03-27 20:58:37 UTC (rev 766)
+++ packages/unstable/dhcdbd/debian/dhcdbd.postinst 2006-03-28 13:23:39 UTC (rev 767)
@@ -3,13 +3,20 @@
case "$1" in
configure)
- if ! getent group netdev > /dev/null; then
+ if ! getent group netdev > /dev/null; then
addgroup --quiet --system netdev
- fi
- # Ask the bus to reload the config file
- if [ -x "/etc/init.d/dbus" ]; then
+ fi
+
+ # Ask the bus to reload the config file
+ if [ -x "/etc/init.d/dbus" ]; then
invoke-rc.d dbus force-reload || true
- fi
+ fi
+
+ # Restart dhcdbd service
+ if [ -x "/etc/dbus-1/event.d/24dhcdbd" ]; then
+ /etc/dbus-1/event.d/24dhcdbd restart
+ fi
+
;;
esac
Modified: packages/unstable/dhcdbd/debian/rules
===================================================================
--- packages/unstable/dhcdbd/debian/rules 2006-03-27 20:58:37 UTC (rev 766)
+++ packages/unstable/dhcdbd/debian/rules 2006-03-28 13:23:39 UTC (rev 767)
@@ -7,12 +7,14 @@
DEB_MAKE_INSTALL_TARGET=install DESTDIR=$(CURDIR)/debian/dhcdbd/
-binary-install/dhcdbd:: build
+binary-install/dhcdbd::
install -d $(CURDIR)/debian/dhcdbd/etc/dhcp3/dhclient-exit-hooks.d/
install -m 644 $(CURDIR)/debian/dhcdbd.dhcp3 \
$(CURDIR)/debian/dhcdbd/etc/dhcp3/dhclient-exit-hooks.d/dhcdbd
+ install -D -m 755 $(CURDIR)/debian/dhcdbd.dbus-event \
+ $(CURDIR)/debian/dhcdbd/etc/dbus-1/event.d/24dhcdbd
binary-fixup/dhcdbd::
- chmod -x ${DEB_DESTDIR}etc/dbus-1/system.d/dhcdbd.conf
- chmod -x ${DEB_DESTDIR}usr/share/dbus-1/services/dhcdbd.service
+ chmod -x $(DEB_DESTDIR)etc/dbus-1/system.d/dhcdbd.conf
+ chmod -x $(DEB_DESTDIR)usr/share/dbus-1/services/dhcdbd.service
More information about the Pkg-utopia-commits
mailing list