Commit 524ad83b authored by Alexander Sack's avatar Alexander Sack Committed by Dan Williams

core: fall back to old system-settings config file

parent a7363851
......@@ -55,6 +55,7 @@
#include "nm-logging.h"
#define NM_DEFAULT_PID_FILE LOCALSTATEDIR"/run/NetworkManager.pid"
#define NM_DEFAULT_SYSTEM_CONF_FILE SYSCONFDIR"/NetworkManager/nm-system-settings.conf"
/*
* Globals
......@@ -333,9 +334,22 @@ main (int argc, char *argv[])
/* Parse the config file */
if (config) {
if (!parse_config_file (config, &plugins, &error)) {
g_warning ("Config file %s invalid: %s.", config, error->message);
g_warning ("Config file %s invalid: (%d) %s.",
config,
error ? error->code : -1,
(error && error->message) ? error->message : "unknown");
exit (1);
}
} else {
config = NM_DEFAULT_SYSTEM_CONF_FILE;
if (!parse_config_file (config, &plugins, &error)) {
g_warning ("Default config file %s invalid: (%d) %s.",
config,
error ? error->code : -1,
(error && error->message) ? error->message : "unknown");
config = NULL;
/* Not a hard failure */
}
}
pidfile = g_strdup (user_pidfile ? user_pidfile : NM_DEFAULT_PID_FILE);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment