Skip to content

Commit

Permalink
qubes-dom0-update: prevent concurrent execution
Browse files Browse the repository at this point in the history
  • Loading branch information
alimirjamali committed Jun 30, 2024
1 parent f6b35ff commit 538e161
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions dom0-updates/qubes-dom0-update
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,13 @@ if [ "$1" = "--help" ]; then
exit
fi

exec 9>"/var/lock/qubes-dom0-update.lock"
flock -n 9
if [[ ${?} -ne 0 ]]; then
echo "Another instance of qubes-dom0-update is already running!"
exit 1
fi

PKGS=()
YUM_OPTS=()
UPDATEVM_OPTS=()
Expand Down

0 comments on commit 538e161

Please sign in to comment.