On Thu, Dec 06, 2018 at 10:33:24AM +0100, Claudio Jeker wrote:
> So doing autoinstall with -B net is great but one thing I was missing is
> changing the reboot behaviour of vmd to exit at a guest reboot.
> I came up with this minimal diff that does the trick for me. Now maybe it
> would be better to have a proper flag for this instead of overloading
> vmc_bootdevice with it.
>
> What is the preferred way of doing this?
> --
> :wq Claudio
I'm ok with this.
reyk@, what are your thoughts?
+--+
Carlos
>
> Index: vmd.c
> ===================================================================
> RCS file: /cvs/src/usr.sbin/vmd/vmd.c,v
> retrieving revision 1.107
> diff -u -p -r1.107 vmd.c
> --- vmd.c 4 Dec 2018 08:15:09 -0000 1.107
> +++ vmd.c 4 Dec 2018 09:11:51 -0000
> @@ -452,7 +452,8 @@ vmd_dispatch_vmm(int fd, struct privsep_
> __func__, vmr.vmr_id);
> break;
> }
> - if (vmr.vmr_result != EAGAIN) {
> + if (vmr.vmr_result != EAGAIN ||
> + vm->vm_params.vmc_bootdevice) {
> if (vm->vm_from_config)
> vm_stop(vm, 0, __func__);
> else
>