From: "Gilles Dartiguelongue (eva)" <eva@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] gentoo-x86 commit in sys-block/gparted/files: gparted-0.3.7-hal-lock.patch
Date: Sun, 15 Jun 2008 18:54:29 +0000 [thread overview]
Message-ID: <E1K7xMz-00062s-Dv@stork.gentoo.org> (raw)
eva 08/06/15 18:54:29
Added: gparted-0.3.7-hal-lock.patch
Log:
do not fail in absence of hal, bug #220459. more su helper sweetness, bug #220383.
(Portage version: 2.1.5.4)
Revision Changes Path
1.1 sys-block/gparted/files/gparted-0.3.7-hal-lock.patch
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-block/gparted/files/gparted-0.3.7-hal-lock.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-block/gparted/files/gparted-0.3.7-hal-lock.patch?rev=1.1&content-type=text/plain
Index: gparted-0.3.7-hal-lock.patch
===================================================================
--- /var/tmp/portage/sys-block/gparted-0.3.7/work/gparted-0.3.7/gparted.in 2008-04-29 16:17:29.000000000 +0200
+++ gparted.in 2008-06-15 19:21:32.000000000 +0200
@@ -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
--
gentoo-commits@lists.gentoo.org mailing list
next reply other threads:[~2008-06-15 18:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-15 18:54 Gilles Dartiguelongue (eva) [this message]
-- strict thread matches above, loose matches on Subject: below --
2008-10-30 21:19 [gentoo-commits] gentoo-x86 commit in sys-block/gparted/files: gparted-0.3.7-hal-lock.patch Gilles Dartiguelongue (eva)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=E1K7xMz-00062s-Dv@stork.gentoo.org \
--to=eva@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox