gparted r849 - trunk
- From: gedakc svn gnome org
- To: svn-commits-list gnome org
- Subject: gparted r849 - trunk
- Date: Sat, 10 May 2008 16:34:39 +0100 (BST)
Author: gedakc
Date: Sat May 10 15:34:39 2008
New Revision: 849
URL: http://svn.gnome.org/viewvc/gparted?rev=849&view=rev
Log:
Removed absolute requirement for hal-lock. GParted will now work on systems with or without hal-lock
Modified:
trunk/ChangeLog
trunk/configure.in
trunk/gparted.in
Modified: trunk/configure.in
==============================================================================
--- trunk/configure.in (original)
+++ trunk/configure.in Sat May 10 15:34:39 2008
@@ -14,12 +14,6 @@
AC_PROG_CXX
AM_PROG_LIBTOOL
-dnl check for hal-lock program
-AC_CHECK_PROG([HAVE_HAL_LOCK], [hal-lock], [yes], [no])
-if test "x$HAVE_HAL_LOCK" = "xno"; then
- AC_MSG_ERROR([*** hal-lock program not found])
-fi
-
dnl======================
dnl i18n stuff
Modified: trunk/gparted.in
==============================================================================
--- trunk/gparted.in (original)
+++ trunk/gparted.in Sat May 10 15:34:39 2008
@@ -1,23 +1,35 @@
-#!/bin/bash
+#!/bin/sh
#
-# Purpose: Acquire device locks prior to running gparted.
+# Purpose: Perform appropriate startup of GParted executable gpartedbin.
+#
+# On systems with hal-lock, use hal-lock to acquire device
+# locks prior to running gpartedbin.
# This is to prevent devices from being automounted.
# File system problems can occur if devices are mounted
# prior to the completion of GParted's operations.
# See GParted bug #324220
# http://bugzilla.gnome.org/show_bug.cgi?id=324220
#
+# On systems without hal-lock, invoke gpartedbin directly.
#
-# Following is a quote from HAL 0.5.10 Specification.
-# http://people.freedesktop.org/~david/hal-spec/hal-spec.html#locking-guidelines
+
#
-# In order to prevent HAL-based automounters from mounting partitions
-# that are being prepared, applications that access block devices
-# directly (and pokes the kernel to reload the partitioning table)
-# should lock out automounters by either a) obtaining the
-# org.freedesktop.Hal.Device.Storage lock on each drive being processed;
-# or b) obtaining the global org.freedesktop.Hal.Device.Storage lock.
+# Search PATH to determine if hal-lock program can be found
#
+HAVE_HAL_LOCK=no
+for k in '' `echo "$PATH" | sed 's,:, ,g'`; do
+ if test -x "$k/hal-lock"; then
+ HAVE_HAL_LOCK=yes
+ break
+ fi
+done
-hal-lock --interface org.freedeskdesktop.Hal.Device.Storage --exclusive \
- --run "@installdir@/gpartedbin $*"
+#
+# Use hal-lock for invocation if it exists, otherwise simply run gpartedbin
+#
+if test "x$HAVE_HAL_LOCK" = "xyes"; then
+ hal-lock --interface org.freedeskdesktop.Hal.Device.Storage --exclusive \
+ --run "@installdir@/gpartedbin $*"
+else
+ @installdir@/gpartedbin $*
+fi
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]