[Pkg-utopia-commits] r3760 - in /packages/experimental/hal/debian: changelog hal.postinst hal.postrm hal.preinst hal.prerm

biebl at users.alioth.debian.org biebl at users.alioth.debian.org
Wed Nov 17 20:07:31 UTC 2010


Author: biebl
Date: Wed Nov 17 20:07:29 2010
New Revision: 3760

URL: http://svn.debian.org/wsvn/pkg-utopia/?sc=1&rev=3760
Log:
debian/hal.prerm: Stop hal on remove.

Added:
    packages/experimental/hal/debian/hal.prerm
Modified:
    packages/experimental/hal/debian/changelog
    packages/experimental/hal/debian/hal.postinst
    packages/experimental/hal/debian/hal.postrm
    packages/experimental/hal/debian/hal.preinst

Modified: packages/experimental/hal/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-utopia/packages/experimental/hal/debian/changelog?rev=3760&op=diff
==============================================================================
--- packages/experimental/hal/debian/changelog (original)
+++ packages/experimental/hal/debian/changelog Wed Nov 17 20:07:29 2010
@@ -12,6 +12,7 @@
       D-Bus to get the main pid. If hald is running kill the process and
       restart it via D-Bus activation.
     - debian/hal.postinst: Restart hal on upgrades.
+    - debian/hal.prerm: Stop hal on remove.
 
  -- Michael Biebl <biebl at debian.org>  Wed, 17 Nov 2010 10:23:43 +0100
 

Modified: packages/experimental/hal/debian/hal.postinst
URL: http://svn.debian.org/wsvn/pkg-utopia/packages/experimental/hal/debian/hal.postinst?rev=3760&op=diff
==============================================================================
--- packages/experimental/hal/debian/hal.postinst (original)
+++ packages/experimental/hal/debian/hal.postinst Wed Nov 17 20:07:29 2010
@@ -101,5 +101,3 @@
 # generated by other debhelper scripts.
 
 #DEBHELPER#
-
-exit 0

Modified: packages/experimental/hal/debian/hal.postrm
URL: http://svn.debian.org/wsvn/pkg-utopia/packages/experimental/hal/debian/hal.postrm?rev=3760&op=diff
==============================================================================
--- packages/experimental/hal/debian/hal.postrm (original)
+++ packages/experimental/hal/debian/hal.postrm Wed Nov 17 20:07:29 2010
@@ -23,5 +23,3 @@
 	rm -f /var/run/hald/acl-list
 	rmdir /var/run/hald || true
 fi
-
-exit 0

Modified: packages/experimental/hal/debian/hal.preinst
URL: http://svn.debian.org/wsvn/pkg-utopia/packages/experimental/hal/debian/hal.preinst?rev=3760&op=diff
==============================================================================
--- packages/experimental/hal/debian/hal.preinst (original)
+++ packages/experimental/hal/debian/hal.preinst Wed Nov 17 20:07:29 2010
@@ -57,5 +57,3 @@
 esac
 
 #DEBHELPER#
-
-exit 0

Added: packages/experimental/hal/debian/hal.prerm
URL: http://svn.debian.org/wsvn/pkg-utopia/packages/experimental/hal/debian/hal.prerm?rev=3760&op=file
==============================================================================
--- packages/experimental/hal/debian/hal.prerm (added)
+++ packages/experimental/hal/debian/hal.prerm Wed Nov 17 20:07:29 2010
@@ -1,0 +1,18 @@
+#!/bin/sh
+
+set -e
+
+get_pid() {
+    [ -n "$1" ] || return 0
+    [ -S /var/run/dbus/system_bus_socket ] || return 0
+
+    dbus-send --system --dest=org.freedesktop.DBus --print-reply \
+              /org/freedesktop/DBus org.freedesktop.DBus.GetConnectionUnixProcessID \
+              string:$1 2>/dev/null | awk '/uint32/ {print $2}'
+}
+
+if [ "$1" = "remove" ]; then
+    kill $(get_pid org.freedesktop.Hal) 2>/dev/null || true
+fi
+
+#DEBHELPER#




More information about the Pkg-utopia-commits mailing list