[Pkg-utopia-commits] r284 - packages/experimental/hal/debian

Sjoerd Simons sjoerd at costa.debian.org
Sat Aug 27 15:32:35 UTC 2005


Author: sjoerd
Date: 2005-08-27 15:32:35 +0000 (Sat, 27 Aug 2005)
New Revision: 284

Modified:
   packages/experimental/hal/debian/changelog
   packages/experimental/hal/debian/control
   packages/experimental/hal/debian/hal.init.dbus
Log:
Sync the changelog with ubuntu (lsb)

Modified: packages/experimental/hal/debian/changelog
===================================================================
--- packages/experimental/hal/debian/changelog	2005-08-27 15:28:17 UTC (rev 283)
+++ packages/experimental/hal/debian/changelog	2005-08-27 15:32:35 UTC (rev 284)
@@ -5,9 +5,14 @@
   * Install hal-umount.sh in /usr/lib/hal instead of usr/lib/hal/hal-umount.sh
   * debian/patches/property-null-values.patch
     + Removed. Fixed upstream
+  * Sync with ubuntu
+    + Switched the init script to lsb-base
+    + hal.init.dbus: If hald does not want to die in do_stop, use the "yes, 
+      we really mean it" approach to ensure clean restarts.
 
- -- Sjoerd Simons <sjoerd at debian.org>  Sat, 27 Aug 2005 17:27:38 +0200
 
+ -- Sjoerd Simons <sjoerd at debian.org>  Sat, 27 Aug 2005 17:30:03 +0200
+
 hal (0.5.2-1) experimental; urgency=low
 
   * New upstream release

Modified: packages/experimental/hal/debian/control
===================================================================
--- packages/experimental/hal/debian/control	2005-08-27 15:28:17 UTC (rev 283)
+++ packages/experimental/hal/debian/control	2005-08-27 15:32:35 UTC (rev 284)
@@ -7,7 +7,7 @@
 
 Package: hal
 Architecture: any
-Depends: ${shlibs:Depends}, adduser, pciutils, usbutils, udev (>= 0.063), dbus
+Depends: ${shlibs:Depends}, adduser, pciutils, usbutils, udev (>= 0.063), dbus, lsb-base
 Suggests: hal-device-manager
 Description: Hardware Abstraction Layer
  HAL provides an abstract view on hardware.

Modified: packages/experimental/hal/debian/hal.init.dbus
===================================================================
--- packages/experimental/hal/debian/hal.init.dbus	2005-08-27 15:28:17 UTC (rev 283)
+++ packages/experimental/hal/debian/hal.init.dbus	2005-08-27 15:32:35 UTC (rev 284)
@@ -17,6 +17,8 @@
 DAEMONUSER=hal
 DESC="Hardware abstraction layer"
 
+. /lib/lsb/init-functions
+
 test -x $DAEMON || exit 0
 
 # Include hal defaults if available
@@ -31,32 +33,26 @@
     mkdir -p $PIDDIR
     chown $DAEMONUSER:$DAEMONUSER $PIDDIR
   fi
-	echo -n "Starting $DESC: "
+	log_begin_msg "Starting $DESC: "
 	start-stop-daemon --start --pidfile $PIDFILE \
 		--exec $DAEMON -- $DAEMON_OPTS
-	echo "$NAME."
+	log_end_msg $?
 }
 
 do_stop() {
-	echo -n "Stopping $DESC: "
-	start-stop-daemon --stop --retry 60 --oknodo --quiet --pidfile $PIDFILE \
+	log_begin_msg "Stopping $DESC: "
+	start-stop-daemon --stop --oknodo --quiet --pidfile $PIDFILE \
 		--exec $DAEMON 
-	echo "$NAME."
-}
 
-supported_kernel() {
-  case "$(uname -r)" in
-    2.6.*) return 0
-      ;;
-  esac
-  return 1
+        # if hald does not want to die, apply some more force
+        if [ -e $PIDFILE ]; then
+            kill -9 $(< $PIDFILE) || true
+            rm -f $PIDFILE
+        fi
+
+	log_end_msg $?
 }
 
-if ! supported_kernel; then
-   echo "Hal requires a 2.6 kernel to work. Not started."
-   exit 0
-fi
-
 case "$1" in
   start)
     do_start
@@ -89,7 +85,7 @@
   *)
 	N=/etc/init.d/$NAME
 	# echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2
-	echo "Usage: $N {start|stop|restart|force-reload}" >&2
+	log_success_msg "Usage: $N {start|stop|restart|force-reload}" >&2
 	exit 1
 	;;
 esac




More information about the Pkg-utopia-commits mailing list