diff options
author | Joseph Hunkeler <jhunkeler@gmail.com> | 2024-04-15 09:50:30 -0400 |
---|---|---|
committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2024-04-15 09:50:30 -0400 |
commit | 208962dfdbd24788a6decf1839ecbbf584fb2e09 (patch) | |
tree | 00ed3dc1cebc5b06df69507685e1ba66455ad382 | |
parent | 97624c22ea3e643e598af782c7f1f40aceeea970 (diff) | |
download | stasis-208962dfdbd24788a6decf1839ecbbf584fb2e09.tar.gz |
Issue a warning if omc.ini is not present at the installed location. (Or wherever OMC_SYSCONFDIR points to)
-rw-r--r-- | src/main.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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); } } |