summaryrefslogtreecommitdiffstats
path: root/package/usbmount/usbmount-0.0.14.1.patch
diff options
context:
space:
mode:
author"Steven J. Hill" <sjhill@realitydiluted.com>2007-05-07 04:03:42 +0000
committer"Steven J. Hill" <sjhill@realitydiluted.com>2007-05-07 04:03:42 +0000
commitdbf0e5eef61a37f427ba1a3aa11db5c880486933 (patch)
treea1d80e70dc452e474a9aaca1899a87fa18364e36 /package/usbmount/usbmount-0.0.14.1.patch
parent458aa926964a6cdc06fb238229f6ebce9d585765 (diff)
downloadbuildroot-novena-dbf0e5eef61a37f427ba1a3aa11db5c880486933.tar.gz
buildroot-novena-dbf0e5eef61a37f427ba1a3aa11db5c880486933.zip
Modify the main script to use the lockfile program utilities. Mounting and un-mounting do not work reliably without them.
Diffstat (limited to 'package/usbmount/usbmount-0.0.14.1.patch')
-rw-r--r--package/usbmount/usbmount-0.0.14.1.patch49
1 files changed, 21 insertions, 28 deletions
diff --git a/package/usbmount/usbmount-0.0.14.1.patch b/package/usbmount/usbmount-0.0.14.1.patch
index c03c89cca..22a5857d9 100644
--- a/package/usbmount/usbmount-0.0.14.1.patch
+++ b/package/usbmount/usbmount-0.0.14.1.patch
@@ -1,22 +1,7 @@
-diff -ru usbmount-0.0.14.1/usbmount usbmount-patched/usbmount
---- usbmount-0.0.14.1/usbmount 2007-01-27 12:22:14.000000000 +0100
-+++ usbmount-patched/usbmount 2007-02-07 12:47:16.000000000 +0100
-@@ -11,7 +11,14 @@
- # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
- # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- # PARTICULAR PURPOSE.
-+
-+#
-+# Changed to support config of logfile and vol_id and creating locks
-+# without the use of lockfile-create all for embedded use.
-+# Joshua D Henderson <jdhende1@rockwellcollins.com>
-+# Patch touched by Alexander Rigbo <alexander.rigbo@acgnystrom.se>
- #
-+
- set -e
- exec > /dev/null 2>&1
-
-@@ -20,7 +27,7 @@
+diff -ur usbmount-0.0.14.1/usbmount usbmount-0.0.14.1-patched/usbmount
+--- usbmount-0.0.14.1/usbmount 2007-01-27 05:22:14.000000000 -0600
++++ usbmount-0.0.14.1-patched/usbmount 2007-03-15 07:25:18.000000000 -0500
+@@ -20,7 +20,7 @@
log()
{
if test $1 != debug || expr "$VERBOSE" : "[yY]" > /dev/null; then
@@ -25,7 +10,7 @@ diff -ru usbmount-0.0.14.1/usbmount usbmount-patched/usbmount
fi
}
-@@ -57,11 +64,11 @@
+@@ -57,11 +57,11 @@
if test "$1" = add; then
# Acquire lock.
@@ -34,17 +19,25 @@ diff -ru usbmount-0.0.14.1/usbmount usbmount-patched/usbmount
- { log err "cannot acquire lock /var/run/usbmount/.mount.lock"; exit 1; }
- trap '( lockfile-remove /var/run/usbmount/.mount )' 0
- log debug "acquired lock /var/run/usbmount/.mount.lock"
-+# log debug "trying to acquire lock /var/run/usbmount/.mount.lock"
-+# lockfile-create --retry 3 /var/run/usbmount/.mount || \
-+# { log err "cannot acquire lock /var/run/usbmount/.mount.lock"; exit 1; }
-+# trap '( lockfile-remove /var/run/usbmount/.mount )' 0
-+# log debug "acquired lock /var/run/usbmount/.mount.lock"
++ log debug "trying to acquire lock /var/run/.usbmount.lock"
++ lockfile-create --retry 5 /var/run/.usbmount || \
++ { log err "cannot acquire lock /var/run/.usbmount.lock"; exit 1; }
++ trap '( lockfile-remove /var/run/.usbmount )' 0
++ log debug "acquired lock /var/run/.usbmount.lock"
# Try to read from the device. Some devices need a few seconds
# initialization time before they can be accessed. Give up after
-diff -ru usbmount-0.0.14.1/usbmount.conf usbmount-patched/usbmount.conf
---- usbmount-0.0.14.1/usbmount.conf 2005-04-08 16:05:10.000000000 +0200
-+++ usbmount-patched/usbmount.conf 2007-02-07 12:44:39.000000000 +0100
+@@ -184,6 +184,7 @@
+ log info "executing command: run-parts /etc/usbmount/umount.d"
+ run-parts /etc/usbmount/umount.d || :
+ fi
++ lockfile-remove /var/run/.usbmount
+ break
+ fi
+ done < /proc/mounts
+diff -ur usbmount-0.0.14.1/usbmount.conf usbmount-0.0.14.1-patched/usbmount.conf
+--- usbmount-0.0.14.1/usbmount.conf 2005-04-08 09:05:10.000000000 -0500
++++ usbmount-0.0.14.1-patched/usbmount.conf 2007-03-15 07:21:33.000000000 -0500
@@ -17,7 +17,7 @@
# sure all data is written to the medium before you remove it (e.g. run the #
# "sync" command in a terminal window). Otherwise, you *WILL* lose data! #