mirror of
https://github.com/saltstack/salt-bootstrap.git
synced 2025-04-17 10:10:25 +00:00
Merge pull request #1181 from rallytime/fix-zypper-process-lock-problem
Wait for zypper processes to finish before calling zypper again
This commit is contained in:
commit
0b300938ae
1 changed files with 7 additions and 0 deletions
|
@ -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 $?
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue