From 0e786ea0820317b28fd96eebe8a4f1fec15509e1 Mon Sep 17 00:00:00 2001 From: dv Date: Tue, 4 May 2021 10:36:01 +0000 Subject: [PATCH] Init debug logging state before attempting to log. Error messages related to bad configuration were not flushing to stderr. OK mlarkin@ --- usr.sbin/vmd/vmd.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/usr.sbin/vmd/vmd.c b/usr.sbin/vmd/vmd.c index 3494db48d87..6ae98624638 100644 --- a/usr.sbin/vmd/vmd.c +++ b/usr.sbin/vmd/vmd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vmd.c,v 1.123 2021/04/26 22:58:27 dv Exp $ */ +/* $OpenBSD: vmd.c,v 1.124 2021/05/04 10:36:01 dv Exp $ */ /* * Copyright (c) 2015 Reyk Floeter @@ -802,6 +802,9 @@ main(int argc, char **argv) if (env->vmd_noaction && !env->vmd_debug) env->vmd_debug = 1; + log_init(env->vmd_debug, LOG_DAEMON); + log_setverbose(env->vmd_verbose); + /* check for root privileges */ if (env->vmd_noaction == 0) { if (geteuid()) @@ -836,9 +839,6 @@ main(int argc, char **argv) /* Configuration will be parsed after forking the children */ env->vmd_conffile = conffile; - log_init(env->vmd_debug, LOG_DAEMON); - log_setverbose(env->vmd_verbose); - if (env->vmd_noaction) ps->ps_noaction = 1; ps->ps_instance = proc_instance; -- 2.20.1