Commit c7f61b62 authored by Richard Hughes's avatar Richard Hughes
Browse files

trivial: Fall back to the system config file

This makes trying the daemon locally much easier.
parent 47a0ed78
......@@ -2807,7 +2807,13 @@ main (int argc, char *argv[])
/* read config file */
config_file = g_build_filename (SYSCONFDIR, "fwupd.conf", NULL);
g_debug ("Loading fallback values from %s", config_file);
if (!g_file_test (config_file, G_FILE_TEST_EXISTS)) {
g_warning ("FuMain: falling back to system config as %s missing",
config_file);
g_free (config_file);
config_file = g_build_filename ("/etc", "fwupd.conf", NULL);
}
g_debug ("loading config values from %s", config_file);
priv->config = g_key_file_new ();
if (!g_key_file_load_from_file (priv->config, config_file,
G_KEY_FILE_NONE, &error)) {
......
Supports Markdown
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