X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/28b23cf59c9031e09c878c6e7278aa510bff04a9..77ec3b2de9bb1880b258ec6aaf4949f146f6fd8d:/package/block-mount/files/fstab.init diff --git a/package/block-mount/files/fstab.init b/package/block-mount/files/fstab.init index aba50ba93..f54051ebb 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