diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2011-06-19 18:15:14 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2011-06-19 18:15:14 +0000 |
commit | b6cbcf42cbc925ae0f773cf56ef7824b52cf7bfa (patch) | |
tree | eee03ea6d09d27a0b4cb5cd781e8169a17fed3ed /package/block-mount/files/fstab.init | |
parent | 191ba94ca27ad224a7202105b9d72d974c981814 (diff) | |
download | upstream-b6cbcf42cbc925ae0f773cf56ef7824b52cf7bfa.tar.gz upstream-b6cbcf42cbc925ae0f773cf56ef7824b52cf7bfa.tar.bz2 upstream-b6cbcf42cbc925ae0f773cf56ef7824b52cf7bfa.zip |
[package] block-mount: remove explicit lock waits, solves some potential race conditions
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@27226 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/block-mount/files/fstab.init')
-rw-r--r-- | package/block-mount/files/fstab.init | 10 |
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 |