summaryrefslogtreecommitdiffstats
path: root/package/block-mount/files/fstab.init
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2011-06-19 18:15:14 +0000
committerJo-Philipp Wich <jow@openwrt.org>2011-06-19 18:15:14 +0000
commita434ed2fc6b8605256d4ae4d473f829d9f27da8c (patch)
treec54bea09a8945927223c516cf9586b7f8491b38f /package/block-mount/files/fstab.init
parente6af77a1c8e6d0c1d57867ca7aeffcb17fc3ebc4 (diff)
downloadmaster-31e0f0ae-a434ed2fc6b8605256d4ae4d473f829d9f27da8c.tar.gz
master-31e0f0ae-a434ed2fc6b8605256d4ae4d473f829d9f27da8c.tar.bz2
master-31e0f0ae-a434ed2fc6b8605256d4ae4d473f829d9f27da8c.zip
block-mount: remove explicit lock waits, solves some potential race conditions
SVN-Revision: 27226
Diffstat (limited to 'package/block-mount/files/fstab.init')
-rw-r--r--package/block-mount/files/fstab.init10
1 files changed, 4 insertions, 6 deletions
diff --git a/package/block-mount/files/fstab.init b/package/block-mount/files/fstab.init
index aba50ba93a..f54051ebb7 100644
--- a/package/block-mount/files/fstab.init
+++ b/package/block-mount/files/fstab.init
@@ -66,13 +66,11 @@ start() {
config_load fstab
mkdir -p /var/lock
- lock -w /var/lock/fstab.lck && {
- lock /var/lock/fstab.lck
- [ -e /tmp/fstab ] || {
- echo '# WARNING: this is an auto generated file, please use uci to set defined filesystems' > /tmp/fstab
- }
- lock -u /var/lock/fstab.lck
+ lock /var/lock/fstab.lck
+ [ -e /tmp/fstab ] || {
+ echo '# WARNING: this is an auto generated file, please use uci to set defined filesystems' > /tmp/fstab
}
+ lock -u /var/lock/fstab.lck
config_foreach do_swapon swap
config_foreach do_mount mount
config_foreach do_swapon swap # do swap a second time so that swap on filesystems is enabled