Skip to content

Commit

Permalink
Merge pull request saltstack#1181 from rallytime/fix-zypper-process-l…
Browse files Browse the repository at this point in the history
…ock-problem

Wait for zypper processes to finish before calling zypper again
  • Loading branch information
Nicole Thomas authored Dec 16, 2017
2 parents 17dc74b + 9fb764d commit 0b30093
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions bootstrap-salt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5456,6 +5456,13 @@ __version_lte() {
}

__zypper() {
# Check if any zypper process is running before calling zypper again.
# This is useful when a zypper call is part of a boot process and will
# wait until the zypper process is finished, such as on AWS AMIs.
while pgrep -l zypper; do
sleep 1
done

zypper --non-interactive "${@}"; return $?
}

Expand Down

0 comments on commit 0b30093

Please sign in to comment.