Browse Source

Add -w option to vmctl stop to wait for completion of VM termination.

Use it in /etc/rc.d/vmd accordingly.
OK sthen@
OPENBSD_6_4
reyk 6 years ago
parent
commit
f5786aed54
1 changed files with 2 additions and 5 deletions
  1. +2
    -5
      src/etc/rc.d/vmd

+ 2
- 5
src/etc/rc.d/vmd View File

@ -1,6 +1,6 @@
#!/bin/ksh #!/bin/ksh
# #
# $OpenBSD: vmd,v 1.7 2018/02/20 10:12:14 sthen Exp $
# $OpenBSD: vmd,v 1.8 2018/07/11 13:19:47 reyk Exp $
daemon="/usr/sbin/vmd" daemon="/usr/sbin/vmd"
@ -17,10 +17,7 @@ list_running() {
rc_stop() { rc_stop() {
for vm in $(list_running); do for vm in $(list_running); do
_rc_do vmctl stop "$vm"
while list_running | fgrep -wq "$vm"; do
sleep .1
done
_rc_do vmctl stop "$vm" -w
done done
pkill -T "${daemon_rtable}" -xf "${pexp}" pkill -T "${daemon_rtable}" -xf "${pexp}"


Loading…
Cancel
Save