add locking to gentooup.sh

This commit is contained in:
layman 2023-01-24 17:05:35 +01:00
parent 46365d1a84
commit 5764e60f0e

View file

@ -1,7 +1,13 @@
#!/bin/bash
LOCKFILE=/usr/portage/gentooup.lock
exec {FD_LOCK}<>"$LOCKFILE"
if ! flock -x -w 60 "$FD_LOCK" ; then
echo "Could not acquire lock for $LOCKFILE"
exit 1
fi
PORTAGE_OPTIONS=("--keep-going" "--autounmask-write" "--binpkg-respect-use=y" "--binpkg-changed-deps=y" "--autounmask-continue")
PORTAGE_OPTIONS=("--keep-going" "--autounmask-write" "--binpkg-changed-deps=y" "--autounmask-continue")
PORTAGE_UPGRADE_OPTIONS=("-vuNDk")