~ubuntu-branches/ubuntu/saucy/udisks/saucy

« back to all changes in this revision

Viewing changes to debian/udisks.prerm

  • Committer: Bazaar Package Importer
  • Author(s): Michael Biebl
  • Date: 2010-09-21 21:05:40 UTC
  • Revision ID: james.westby@ubuntu.com-20100921210540-rjt0upzm4a8584cq
Tags: 1.0.1+git20100614-2
* debian/udisks.postinst
  - Query D-Bus to find out the correct pid of the process claiming
    org.freedesktop.UDisks. This way we do not accidentally kill the
    wrong process when being installed in a chroot. (Closes: #593195)
* debian/udisks.prerm
  - Stop udisks-daemon on remove. (Closes: #590013)
* debian/control
  - Bump Standards-Version to 3.9.1. No further changes.
  - Update Build-Depends according to configure.ac.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
 
 
3
set -e
 
4
 
 
5
get_pid() {
 
6
    [ -n "$1" ] || return 0
 
7
    [ -S /var/run/dbus/system_bus_socket ] || return 0
 
8
 
 
9
    dbus-send --system --dest=org.freedesktop.DBus --print-reply \
 
10
              /org/freedesktop/DBus org.freedesktop.DBus.GetConnectionUnixProcessID \
 
11
              string:$1 2>/dev/null | awk '/uint32/ {print $2}'
 
12
}
 
13
 
 
14
if [ "$1" = "remove" ]; then
 
15
    kill $(get_pid org.freedesktop.UDisks) 2>/dev/null || true
 
16
fi
 
17
 
 
18
#DEBHELPER#