From f242ccba462ae12bc7fd82a0ae774e60bf12e008 Mon Sep 17 00:00:00 2001 From: Curtis Gedak Date: Wed, 21 Jul 2010 10:32:06 -0600 Subject: [PATCH] If available use both udisks and hal-lock to prevent auto-mounting --- gparted.in | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/gparted.in b/gparted.in index 3a2696d7..67baefb2 100644 --- a/gparted.in +++ b/gparted.in @@ -52,7 +52,8 @@ for k in '' `echo "$PATH" | sed 's,:, ,g'`; do done # -# Use udisks if binary exists and daemon is running. +# Use both udisks and hal-lock if both binaries exists and both daemons are running. +# Else use udisks if binary exists and daemon is running. # Else use both devkit-disks and hal-lock for invocation if both binaries exist # and both of the daemons are running. # Else use devkit-disks if binary exists and daemon is running. @@ -60,7 +61,11 @@ done # If the above checks fail then simply run gpartedbin. # BASE_CMD="@installdir@/gpartedbin $*" -if test "x$HAVE_UDISKS" = "xyes"; then +if test "x$HAVE_UDISKS" = "xyes" && test "x$HAVE_HAL_LOCK" = "xyes"; then + udisks --inhibit -- \ + hal-lock --interface org.freedesktop.Hal.Device.Storage --exclusive \ + --run "$BASE_CMD" +elif test "x$HAVE_UDISKS" = "xyes"; then udisks --inhibit -- $BASE_CMD elif test "x$HAVE_DEVKIT_DISKS" = "xyes" && test "x$HAVE_HAL_LOCK" = "xyes"; then devkit-disks --inhibit -- \