From 208962dfdbd24788a6decf1839ecbbf584fb2e09 Mon Sep 17 00:00:00 2001 From: Joseph Hunkeler Date: Mon, 15 Apr 2024 09:50:30 -0400 Subject: Issue a warning if omc.ini is not present at the installed location. (Or wherever OMC_SYSCONFDIR points to) --- src/main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/main.c') diff --git a/src/main.c b/src/main.c index e070911..0b2fab8 100644 --- a/src/main.c +++ b/src/main.c @@ -327,8 +327,10 @@ int main(int argc, char *argv[]) { // no configuration passed by argument. use basic config. char cfgfile[PATH_MAX * 2]; sprintf(cfgfile, "%s/%s", globals.sysconfdir, "omc.ini"); - if (!access(cfgfile, F_OK)) { + if (!access(cfgfile, F_OK | R_OK)) { config_input = strdup(cfgfile); + } else { + msg(OMC_MSG_WARN, "OMC global configuration is not readable, or does not exist: %s", cfgfile); } } -- cgit