[Pkg-utopia-commits] r1503 - in /packages/unstable/hal/debian: changelog hal.init hal.init.dbus hal.postinst hal.preinst hal.prerm rules

biebl at users.alioth.debian.org biebl at users.alioth.debian.org
Wed May 23 10:52:26 UTC 2007


Author: biebl
Date: Wed May 23 10:52:26 2007
New Revision: 1503

URL: http://svn.debian.org/wsvn/pkg-utopia/?sc=1&rev=1503
Log:
  * Install the hal start script as regular SysV init script
    (Closes: #407132, #397223)
    - Rename debian/hal.init.dbus to debian/hal.init.
    - Add proper LSB header to debian/hal.init and cleanup some cruft.
    - debian/rules
      + Don't install /etc/dbus-1/event.d/20hal anymore.
      + Set DEB_DH_INSTALLINIT_ARGS to start at 24 and stop at 16.
    - debian/hal.{preinst,postinst,prerm}
      + The shell code to start/stop the hal daemon is now automatically
        created by dh_installinit, so remove the manually written code.
        hal.prerm is empty and therefore removed completely.
    - debian/hal.preinst
      + Remove the old conffile /etc/dbus-1/event.d/20hal or rename it to
        *.dpkg-bak if it was modified locally.


Added:
    packages/unstable/hal/debian/hal.init
      - copied, changed from r1473, packages/unstable/hal/debian/hal.init.dbus
Removed:
    packages/unstable/hal/debian/hal.init.dbus
    packages/unstable/hal/debian/hal.prerm
Modified:
    packages/unstable/hal/debian/changelog
    packages/unstable/hal/debian/hal.postinst
    packages/unstable/hal/debian/hal.preinst
    packages/unstable/hal/debian/rules

Modified: packages/unstable/hal/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-utopia/packages/unstable/hal/debian/changelog?rev=1503&op=diff
==============================================================================
--- packages/unstable/hal/debian/changelog (original)
+++ packages/unstable/hal/debian/changelog Wed May 23 10:52:26 2007
@@ -1,3 +1,22 @@
+hal (0.5.9-3) unstable; urgency=low
+
+  * Install the hal start script as regular SysV init script
+    (Closes: #407132, #397223)
+    - Rename debian/hal.init.dbus to debian/hal.init.
+    - Add proper LSB header to debian/hal.init and cleanup some cruft.
+    - debian/rules
+      + Don't install /etc/dbus-1/event.d/20hal anymore.
+      + Set DEB_DH_INSTALLINIT_ARGS to start at 24 and stop at 16.
+    - debian/hal.{preinst,postinst,prerm}
+      + The shell code to start/stop the hal daemon is now automatically
+        created by dh_installinit, so remove the manually written code.
+        hal.prerm is empty and therefore removed completely.
+    - debian/hal.preinst
+      + Remove the old conffile /etc/dbus-1/event.d/20hal or rename it to
+        *.dpkg-bak if it was modified locally.
+
+ -- Michael Biebl <biebl at debian.org>  Wed, 23 May 2007 12:33:08 +0200
+
 hal (0.5.9-2) unstable; urgency=low
 
   [ Michael Biebl ]

Copied: packages/unstable/hal/debian/hal.init (from r1473, packages/unstable/hal/debian/hal.init.dbus)
URL: http://svn.debian.org/wsvn/pkg-utopia/packages/unstable/hal/debian/hal.init?rev=1503&op=diff
==============================================================================
--- packages/unstable/hal/debian/hal.init.dbus (original)
+++ packages/unstable/hal/debian/hal.init Wed May 23 10:52:26 2007
@@ -1,13 +1,16 @@
 #! /bin/sh
-#
-# hal		Start the Daemon that stores device informations
-#		for the Hardware abstraction layer
-#
-#		Written by Martin Waitz based on skeleton code
-#		written by Miquel van Smoorenburg <miquels at cistron.nl>.
-#		Modified for Debian 
-#		by Ian Murdock <imurdock at gnu.ai.mit.edu>.
-#
+### BEGIN INIT INFO
+# Provides:          hal
+# Required-Start:    $local_fs dbus
+# Required-Stop:     $local_fs dbus
+# Should-Start:	     $syslog acpid
+# Should-Stop:       $syslog acpid
+# Default-Start:     2 3 4 5
+# Default-Stop:      S 0 1 6
+# Short-Description: Hardware abstraction layer
+# Description:       The HAL daemon collects and maintains information about
+#                    your hardware.
+### END INIT INFO
 
 PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
 DAEMON=/usr/sbin/hald
@@ -29,51 +32,36 @@
 set -e
 
 do_start() {
-  if [ ! -d $PIDDIR ]; then
-    mkdir -p $PIDDIR
-    chown $DAEMONUSER:$DAEMONUSER $PIDDIR
-  fi
-	log_daemon_msg "Starting $DESC" "$NAME"
+	if [ ! -d $PIDDIR ]; then
+		mkdir -p $PIDDIR
+		chown $DAEMONUSER:$DAEMONUSER $PIDDIR
+	fi
 	start-stop-daemon --start --pidfile $PIDFILE \
 		--exec $DAEMON -- $DAEMON_OPTS
-	log_end_msg $?
 }
 
 do_stop() {
-	log_daemon_msg "Stopping $DESC" "$NAME"
 	start-stop-daemon --stop --oknodo --quiet --pidfile $PIDFILE \
 		--exec $DAEMON 
-	log_end_msg $?
 }
 
 case "$1" in
   start)
-    do_start
+	log_daemon_msg "Starting $DESC" "$NAME"
+	do_start
+	log_end_msg $?
 	;;
   stop)
-    do_stop
+	log_daemon_msg "Stopping $DESC" "$NAME"
+	do_stop
+	log_end_msg $?
 	;;
-  #reload)
-	#
-	#	If the daemon can reload its config files on the fly
-	#	for example by sending it SIGHUP, do it here.
-	#
-	#	If the daemon responds to changes in its config file
-	#	directly anyway, make this a do-nothing entry.
-	#
-	# echo "Reloading $DESC configuration files."
-	# start-stop-daemon --stop --signal 1 --quiet --pidfile \
-	#	/var/run/$NAME.pid --exec $DAEMON
-  #;;
   restart|force-reload)
-	#
-	#	If the "reload" option is implemented, move the "force-reload"
-	#	option to the "reload" entry above. If not, "force-reload" is
-	#	just the same as "restart".
-	#
-  do_stop
-	sleep 5
-  do_start
+	log_daemon_msg "Restarting $DESC" "$NAME"
+	do_stop
+	sleep 1
+	do_start
+	log_end_msg $?
 	;;
   *)
 	log_success_msg "Usage: $0 {start|stop|restart|force-reload}" >&2

Modified: packages/unstable/hal/debian/hal.postinst
URL: http://svn.debian.org/wsvn/pkg-utopia/packages/unstable/hal/debian/hal.postinst?rev=1503&op=diff
==============================================================================
--- packages/unstable/hal/debian/hal.postinst (original)
+++ packages/unstable/hal/debian/hal.postinst Wed May 23 10:52:26 2007
@@ -43,7 +43,6 @@
 
     if [ -x /etc/init.d/dbus ]; then
       invoke-rc.d dbus force-reload || true
-      /etc/dbus-1/event.d/20hal start || true
     fi
 
 

Modified: packages/unstable/hal/debian/hal.preinst
URL: http://svn.debian.org/wsvn/pkg-utopia/packages/unstable/hal/debian/hal.preinst?rev=1503&op=diff
==============================================================================
--- packages/unstable/hal/debian/hal.preinst (original)
+++ packages/unstable/hal/debian/hal.preinst Wed May 23 10:52:26 2007
@@ -19,31 +19,30 @@
 }
 
 case "$1" in
-install|upgrade)
+  install|upgrade)
     if dpkg --compare-versions "$2" le "0.5.2-1"; then
-        rm_conffile "/etc/hal/fdi/preferences.fdi"
-        rm_conffile "/etc/dev.d/block/hal-unmount.dev"
+      rm_conffile "/etc/hal/fdi/preferences.fdi"
+      rm_conffile "/etc/dev.d/block/hal-unmount.dev"
     fi
     if dpkg --compare-versions "$2" le "0.5.6-2"; then
-        rm_conffile "/etc/udev/scripts/device-removable.sh" 
+      rm_conffile "/etc/udev/scripts/device-removable.sh" 
     fi
     if dpkg --compare-versions "$2" le "0.5.6-4"; then
-        rm_conffile "/etc/hal/fdi/preferences.fdi"
+      rm_conffile "/etc/hal/fdi/preferences.fdi"
     fi
     if dpkg --compare-versions "$2" le "0.5.7-2"; then
-        rm_conffile "/etc/udev/rules.d/90-hal.rules"
+      rm_conffile "/etc/udev/rules.d/90-hal.rules"
     fi
     if dpkg --compare-versions "$2" le "0.5.7.1-1"; then
-       deluser --quiet --system hal > /dev/null || true
+      deluser --quiet --system hal > /dev/null || true
+    fi
+    if dpkg --compare-versions "$2" lt "0.5.9-3"; then
+      if [ -x /etc/dbus-1/event.d/20hal ]; then
+        /etc/dbus-1/event.d/20hal stop
+      fi
+      rm_conffile "/etc/dbus-1/event.d/20hal"
     fi
 esac
-
-
-if [ "$1" = "upgrade" ]; then
-  if [ -x /etc/dbus-1/event.d/20hal ]; then
-    /etc/dbus-1/event.d/20hal stop
-  fi
-fi
 
 #DEBHELPER#
 

Modified: packages/unstable/hal/debian/rules
URL: http://svn.debian.org/wsvn/pkg-utopia/packages/unstable/hal/debian/rules?rev=1503&op=diff
==============================================================================
--- packages/unstable/hal/debian/rules (original)
+++ packages/unstable/hal/debian/rules Wed May 23 10:52:26 2007
@@ -15,6 +15,8 @@
                              --enable-docbook-docs \
                              --docdir=/usr/share/doc/hal-doc
 
+DEB_DH_INSTALLINIT_ARGS := -- start 24 2 3 4 5 . stop 16 0 1 6 .
+
 binary-install/hal-device-manager::
 	dh_pysupport -phal-device-manager /usr/share/hal/device-manager/
 
@@ -22,11 +24,6 @@
 	# Remove hal's default udev rules files.. We ship our own
 	rm -rf $(DEB_DESTDIR)/etc/udev
 
-	# start/stop hal together with dbus
-	install -d $(DEB_DESTDIR)/etc/dbus-1/event.d
-	install -m 755 debian/hal.init.dbus \
-		$(DEB_DESTDIR)/etc/dbus-1/event.d/20hal
-	
 	install -m 644 -D debian/hal.udev.rules \
 		$(DEB_DESTDIR)/etc/udev/hal.rules
 	install -m 755 -D debian/hal-unmount.sh \




More information about the Pkg-utopia-commits mailing list