[Pkg-utopia-commits] r49 - packages/hal/branches/0.2.98/debian

Sjoerd Simons sjoerd@haydn.debian.org
Sat, 23 Oct 2004 05:34:55 -0600


Author: sjoerd
Date: 2004-10-23 05:34:45 -0600 (Sat, 23 Oct 2004)
New Revision: 49

Modified:
   packages/hal/branches/0.2.98/debian/changelog
   packages/hal/branches/0.2.98/debian/hal.postinst
   packages/hal/branches/0.2.98/debian/hal.preinst
Log:
* Only stop hal in the pre-inst phase
* Only restart dbus-1 if the init script is there (fixes problems when dbus-1
  and hal are installed at the same time)


Modified: packages/hal/branches/0.2.98/debian/changelog
===================================================================
--- packages/hal/branches/0.2.98/debian/changelog	2004-10-23 10:30:54 UTC (rev 48)
+++ packages/hal/branches/0.2.98/debian/changelog	2004-10-23 11:34:45 UTC (rev 49)
@@ -3,6 +3,9 @@
   * debian/hald.8: Fixed typos (Closes: #277530)
   * debian/rules: Correctly generate the python dependencies for 
                   hal-device-manager 
+  * debian/hal.postinst: Don't fail when the dbus-1 init script isn't
+                         available yet.
+  * debian/hal.preinst: Stop hal in preinst instead of the whole dbus
 
  -- Sjoerd Simons <sjoerd@debian.org>  Sat, 23 Oct 2004 12:05:58 +0200
 

Modified: packages/hal/branches/0.2.98/debian/hal.postinst
===================================================================
--- packages/hal/branches/0.2.98/debian/hal.postinst	2004-10-23 10:30:54 UTC (rev 48)
+++ packages/hal/branches/0.2.98/debian/hal.postinst	2004-10-23 11:34:45 UTC (rev 49)
@@ -38,7 +38,9 @@
 		mv /etc/init.d/hal /etc/dbus-1/event.d/
 		update-rc.d hal remove
 	fi
-	invoke-rc.d dbus-1 restart
+  if [ -x /etc/init.d/dbus-1 ]; then
+   	invoke-rc.d dbus-1 restart || true
+  fi
     ;;
     abort-upgrade|abort-remove|abort-deconfigure)
 

Modified: packages/hal/branches/0.2.98/debian/hal.preinst
===================================================================
--- packages/hal/branches/0.2.98/debian/hal.preinst	2004-10-23 10:30:54 UTC (rev 48)
+++ packages/hal/branches/0.2.98/debian/hal.preinst	2004-10-23 11:34:45 UTC (rev 49)
@@ -6,8 +6,6 @@
   mv -f /etc/hal/device.d/fstab-update.sh \
     /etc/hal/device.d/fstab-update.hal || true
 fi
-if [ "$1" = "install" -o "$1" = "upgrade" ]; then
-  invoke-rc.d dbus-1 stop
-  # sometimes it takes dbus a while to really stop.
-  sleep 3;
+if [ "$1" = "upgrade" ]; then
+  start-stop-daemon --quiet --stop --oknodo --exec /usr/sbin/hald
 fi