Hello tech@,

When playing around with local prefix in vm.conf(5) I noticed that it
wasn't picked up by my vm. The reason for this was that config_setvm was
called before config_setconfig. Diff below fixes this.

OK?

martijn@

Index: vmd.c
===================================================================
RCS file: /cvs/src/usr.sbin/vmd/vmd.c,v
retrieving revision 1.80
diff -u -p -r1.80 vmd.c
--- vmd.c       18 Feb 2018 01:00:25 -0000      1.80
+++ vmd.c       21 Feb 2018 22:26:35 -0000
@@ -821,6 +821,10 @@ vmd_configure(void)
                exit(1);
        }
 
+       /* Send shared global configuration to all children */
+       if (config_setconfig(env) == -1)
+               return (-1);
+
        if (env->vmd_noaction) {
                fprintf(stderr, "configuration OK\n");
                proc_kill(&env->vmd_ps);
@@ -848,10 +852,6 @@ vmd_configure(void)
                if (config_setvm(&env->vmd_ps, vm, -1, vm->vm_params.vmc_uid) 
== -1)
                        return (-1);
        }
-
-       /* Send shared global configuration to all children */
-       if (config_setconfig(env) == -1)
-               return (-1);
 
        return (0);
 }

Reply via email to