mirror of
https://gitlab.gnome.org/GNOME/gparted
synced 2024-08-27 19:50:23 +00:00
Handle change in path for udisks2-inhibit executable (!84)
Debian (and derived) distros with the udisks2 [1] repository and the
additional 'udisks2-inhibit' executable had the location changed from:
/usr/lib/udisks2/
to:
/usr/libexec/udisks2/
with udisks2 version 2.8.4-2 and the following commit:
f6744a33 - Move the daemons to /usr/libexec now that's allowed in the policy
f6744a3364
Distros such as Fedora and openSUSE are unaffected as the udisks [2]
repository does not contain 'udisks2-inhibit'.
[1] udisks2 Debian (and derived) repository
https://salsa.debian.org/utopia-team/udisks2
[2] udisks repository
https://github.com/storaged-project/udisks
Closes !84 - Handle change in path for udisks2-inhibit executable
This commit is contained in:
parent
665277c6ef
commit
325c6eb247
11
gparted.in
11
gparted.in
|
@ -102,15 +102,20 @@ for k in '' `echo "$PATH" | sed 's,:, ,g'`; do
|
|||
done
|
||||
|
||||
#
|
||||
# Check if udisks2-inhibit exists in known location
|
||||
# Check if udisks2-inhibit exists in a known location
|
||||
# and if appropriate daemon is running.
|
||||
#
|
||||
HAVE_UDISKS2_INHIBIT=no
|
||||
if test -x "/usr/lib/udisks2/udisks2-inhibit"; then
|
||||
for k in /usr/libexec/udisks2/udisks2-inhibit \
|
||||
/usr/lib/udisks2/udisks2-inhibit; do
|
||||
if test -x $k; then
|
||||
if pidof udisksd 1> /dev/null; then
|
||||
HAVE_UDISKS2_INHIBIT=yes
|
||||
UDISKS2_INHIBIT_BIN=$k
|
||||
break
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
#
|
||||
# Search PATH to determine if udisks program can be found
|
||||
|
@ -206,7 +211,7 @@ done
|
|||
# If the above checks fail then simply run gpartedbin.
|
||||
#
|
||||
if test "x$HAVE_UDISKS2_INHIBIT" = "xyes"; then
|
||||
/usr/lib/udisks2/udisks2-inhibit $BASE_CMD
|
||||
$UDISKS2_INHIBIT_BIN $BASE_CMD
|
||||
elif test "x$HAVE_UDISKS" = "xyes" && test "x$HAVE_HAL_LOCK" = "xyes"; then
|
||||
udisks --inhibit -- \
|
||||
hal-lock --interface org.freedesktop.Hal.Device.Storage --exclusive \
|
||||
|
|
Loading…
Reference in a new issue