sabayon-maint-helper: acquire lock before execution

This commit is contained in:
mudler
2016-10-10 16:44:34 +02:00
parent 0769169cc6
commit 79567a647b
+7 -1
View File
@@ -81,7 +81,13 @@ main() {
[ -z "$@" ] && help_msg && exit 1
parse_args "$@"
(
echo "Acquiring lock"
flock -x -w 10 200 || ( echo "Failed acquiring lock in 10 seconds" && exit 1 )
parse_args "$@"
) 200>/var/lock/.repomaint
}