summaryrefslogtreecommitdiff
path: root/etc/rc.d
diff options
context:
space:
mode:
authorReyk Floeter <reyk@cvs.openbsd.org>2018-07-11 13:19:48 +0000
committerReyk Floeter <reyk@cvs.openbsd.org>2018-07-11 13:19:48 +0000
commit086fb89ddce69eda23ca9772b51da5a824e164ba (patch)
tree91575a8755c1ff3f13d0b40230b491b14de36dc2 /etc/rc.d
parent64023a9a5ca6c9d8e91b62e58ba084396cdbccff (diff)
Add -w option to vmctl stop to wait for completion of VM termination.
Use it in /etc/rc.d/vmd accordingly. OK sthen@
Diffstat (limited to 'etc/rc.d')
-rw-r--r--etc/rc.d/vmd7
1 files changed, 2 insertions, 5 deletions
diff --git a/etc/rc.d/vmd b/etc/rc.d/vmd
index f023ff34954..5db928072bd 100644
--- a/etc/rc.d/vmd
+++ b/etc/rc.d/vmd
@@ -1,6 +1,6 @@
#!/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"
@@ -17,10 +17,7 @@ list_running() {
rc_stop() {
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
pkill -T "${daemon_rtable}" -xf "${pexp}"