Ubuntu

Merge lp:~rodrigo-moya/ubuntu/oneiric/accountsservice/add_postinst into lp:ubuntu/oneiric/accountsservice

Proposed by Rodrigo Moya on 2011-06-15
Status: Merged
Merge reported by: Sebastien Bacher
Merged at revision: not available
Proposed branch: lp:~rodrigo-moya/ubuntu/oneiric/accountsservice/add_postinst
Merge into: lp:ubuntu/oneiric/accountsservice
Diff against target: 62 lines (+45/-0) 3 files modified
To merge this branch: bzr merge lp:~rodrigo-moya/ubuntu/oneiric/accountsservice/add_postinst
Reviewer Review Type Date Requested Status
Ubuntu branches 2011-06-15 Pending
Review via email: mp+64664@code.launchpad.net
To post a comment you must log in.
Rodrigo Moya (rodrigo-moya) wrote :

This patch has been sent to debian as http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=630577 , so ignore the merge request, it will be synced to Ubuntu as soon as it's in Debian

Preview Diff

1=== added file 'debian/accountsservice.postinst'
2--- debian/accountsservice.postinst 1970-01-01 00:00:00 +0000
3+++ debian/accountsservice.postinst 2011-06-15 11:03:46 +0000
4@@ -0,0 +1,21 @@
5+#!/bin/sh
6+
7+set -e
8+
9+get_pid() {
10+ [ -n "$1" ] || return 0
11+ [ -S /var/run/dbus/system_bus_socket ] || return 0
12+
13+ dbus-send --system --dest=org.freedesktop.DBus --print-reply \
14+ /org/freedesktop/DBus org.freedesktop.DBus.GetConnectionUnixProcessID \
15+ string:$1 2>/dev/null | awk '/uint32/ {print $2}'
16+}
17+
18+if [ "$1" = "configure" ]; then
19+ # stop accounts-daemon
20+ pid=$(get_pid org.freedesktop.Accounts)
21+ kill $pid 2>/dev/null || true
22+
23+ # restart daemon if it was running before
24+ [ -z "$pid" ] || /usr/lib/accountsservice/accounts-daemon & >/dev/null || true # will trigger through D-Bus activation
25+fi
26
27=== added file 'debian/accountsservice.prerm'
28--- debian/accountsservice.prerm 1970-01-01 00:00:00 +0000
29+++ debian/accountsservice.prerm 2011-06-15 11:03:46 +0000
30@@ -0,0 +1,16 @@
31+#!/bin/sh
32+
33+set -e
34+
35+get_pid() {
36+ [ -n "$1" ] || return 0
37+ [ -S /var/run/dbus/system_bus_socket ] || return 0
38+
39+ dbus-send --system --dest=org.freedesktop.DBus --print-reply \
40+ /org/freedesktop/DBus org.freedesktop.DBus.GetConnectionUnixProcessID \
41+ string:$1 2>/dev/null | awk '/uint32/ {print $2}'
42+}
43+
44+if [ "$1" = "remove" ]; then
45+ kill $(get_pid org.freedesktop.Accounts) 2>/dev/null || true
46+fi
47
48=== modified file 'debian/changelog'
49--- debian/changelog 2011-06-05 12:40:37 +0000
50+++ debian/changelog 2011-06-15 11:03:46 +0000
51@@ -1,3 +1,11 @@
52+accountsservice (0.6.12-2ubuntu1) oneiric; urgency=low
53+
54+ * debian/accountsservice.postinst:
55+ * debian/accountsservice.prerm:
56+ - Add scripts to shut down daemon on package upgrades/removals
57+
58+ -- Rodrigo Moya <rodrigo.moya@canonical.com> Wed, 15 Jun 2011 12:43:36 +0200
59+
60 accountsservice (0.6.12-2) unstable; urgency=low
61
62 * Disable 0005-gdm_config_file_path.patch in debian/patches/ubuntu.series as

Subscribers

People subscribed via source and target branches

to all changes: