Skip to content

Commit

Permalink
Fix (qemu): add a wait time to ensure display manager has stopped
Browse files Browse the repository at this point in the history
  • Loading branch information
mateussouzaweb committed Aug 7, 2024
1 parent 6d3e6af commit 6a44296
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Scripts/hooks/qemu
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,11 @@ function stop_display_manager {
debug "Stopping ${manager} display service"
echo "${manager}" >> "${VMF}-display-manager"
systemctl stop "${manager}.service"
sleep "2"
fi
while systemctl is-active --quiet "${manager}.service"; do
debug "Waiting for ${manager} display service to stop"
sleep "5"
sleep "2"
done
fi

Expand All @@ -56,6 +57,7 @@ function restore_display_manager {
if [ -f "${VMF}-display-manager" ]; then
while read -r manager; do
if [ -x "$(command -v systemctl)" ]; then
sleep "2"
debug "Starting ${manager} display service again"
systemctl start "${manager}.service"
fi
Expand Down

0 comments on commit 6a44296

Please sign in to comment.