1 |
eva 08/06/15 18:54:29 |
2 |
|
3 |
Added: gparted-0.3.7-hal-lock.patch |
4 |
Log: |
5 |
do not fail in absence of hal, bug #220459. more su helper sweetness, bug #220383. |
6 |
(Portage version: 2.1.5.4) |
7 |
|
8 |
Revision Changes Path |
9 |
1.1 sys-block/gparted/files/gparted-0.3.7-hal-lock.patch |
10 |
|
11 |
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 |
12 |
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 |
13 |
|
14 |
Index: gparted-0.3.7-hal-lock.patch |
15 |
=================================================================== |
16 |
--- /var/tmp/portage/sys-block/gparted-0.3.7/work/gparted-0.3.7/gparted.in 2008-04-29 16:17:29.000000000 +0200 |
17 |
+++ gparted.in 2008-06-15 19:21:32.000000000 +0200 |
18 |
@@ -1,23 +1,35 @@ |
19 |
-#!/bin/bash |
20 |
+#!/bin/sh |
21 |
# |
22 |
-# Purpose: Acquire device locks prior to running gparted. |
23 |
+# Purpose: Perform appropriate startup of GParted executable gpartedbin. |
24 |
+# |
25 |
+# On systems with hal-lock, use hal-lock to acquire device |
26 |
+# locks prior to running gpartedbin. |
27 |
# This is to prevent devices from being automounted. |
28 |
# File system problems can occur if devices are mounted |
29 |
# prior to the completion of GParted's operations. |
30 |
# See GParted bug #324220 |
31 |
# http://bugzilla.gnome.org/show_bug.cgi?id=324220 |
32 |
# |
33 |
+# On systems without hal-lock, invoke gpartedbin directly. |
34 |
# |
35 |
-# Following is a quote from HAL 0.5.10 Specification. |
36 |
-# http://people.freedesktop.org/~david/hal-spec/hal-spec.html#locking-guidelines |
37 |
+ |
38 |
# |
39 |
-# In order to prevent HAL-based automounters from mounting partitions |
40 |
-# that are being prepared, applications that access block devices |
41 |
-# directly (and pokes the kernel to reload the partitioning table) |
42 |
-# should lock out automounters by either a) obtaining the |
43 |
-# org.freedesktop.Hal.Device.Storage lock on each drive being processed; |
44 |
-# or b) obtaining the global org.freedesktop.Hal.Device.Storage lock. |
45 |
+# Search PATH to determine if hal-lock program can be found |
46 |
# |
47 |
+HAVE_HAL_LOCK=no |
48 |
+for k in '' `echo "$PATH" | sed 's,:, ,g'`; do |
49 |
+ if test -x "$k/hal-lock"; then |
50 |
+ HAVE_HAL_LOCK=yes |
51 |
+ break |
52 |
+ fi |
53 |
+done |
54 |
|
55 |
-hal-lock --interface org.freedeskdesktop.Hal.Device.Storage --exclusive \ |
56 |
- --run @installdir@/gpartedbin $* |
57 |
+# |
58 |
+# Use hal-lock for invocation if it exists, otherwise simply run gpartedbin |
59 |
+# |
60 |
+if test "x$HAVE_HAL_LOCK" = "xyes"; then |
61 |
+ hal-lock --interface org.freedeskdesktop.Hal.Device.Storage --exclusive \ |
62 |
+ --run "@installdir@/gpartedbin $*" |
63 |
+else |
64 |
+ @installdir@/gpartedbin $* |
65 |
+fi |
66 |
|
67 |
|
68 |
|
69 |
-- |
70 |
gentoo-commits@l.g.o mailing list |