1
From 4168794e8e80d2d6457d87f33983cee2d836f527 Mon Sep 17 00:00:00 2001
2
From: Curtis Gedak <gedakc@gmail.com>
3
Date: Tue, 01 Jun 2010 23:04:39 +0000
4
Subject: Handle devkit-disks being renamed to udisks on Dec. 1, 2009.
6
Reference link for devkit-disks being renamed to udisks:
7
http://www.freedesktop.org/wiki/Software/DeviceKit-disks
9
Bug-Ubuntu: https://launchpad.net/bugs/588530
11
diff --git a/gparted.in b/gparted.in
12
index e6c1473..3a2696d 100755..100644
19
+# Search PATH to determine if udisks program can be found
20
+# and if appropriate daemon is running.
23
+for k in '' `echo "$PATH" | sed 's,:, ,g'`; do
24
+ if test -x "$k/udisks"; then
25
+ if test "z`ps -e | grep udisks-daemon`" != "z"; then
33
# Search PATH to determine if devkit-disks program can be found
34
# and if appropriate daemon is running.
35
+# On December 1, 2009, devkit-disks was named udisks.
38
for k in '' `echo "$PATH" | sed 's,:, ,g'`; do
39
@@ -37,14 +52,17 @@ for k in '' `echo "$PATH" | sed 's,:, ,g'`; do
43
-# Use both devkit-disks and hal-lock for invocation if both binaries exist
44
+# Use udisks if binary exists and daemon is running.
45
+# Else use both devkit-disks and hal-lock for invocation if both binaries exist
46
# and both of the daemons are running.
47
-# Else use devkit-disks for invocation if binary exists and daemon is running.
48
+# Else use devkit-disks if binary exists and daemon is running.
49
# Otherwise use hal-lock for invocation if binary exists and daemon is running.
50
# If the above checks fail then simply run gpartedbin.
52
BASE_CMD="@installdir@/gpartedbin $*"
53
-if test "x$HAVE_DEVKIT_DISKS" = "xyes" && test "x$HAVE_HAL_LOCK" = "xyes"; then
54
+if test "x$HAVE_UDISKS" = "xyes"; then
55
+ udisks --inhibit -- $BASE_CMD
56
+elif test "x$HAVE_DEVKIT_DISKS" = "xyes" && test "x$HAVE_HAL_LOCK" = "xyes"; then
57
devkit-disks --inhibit -- \
58
hal-lock --interface org.freedesktop.Hal.Device.Storage --exclusive \