mirror of
https://git.proxmox.com/git/fwupd
synced 2025-08-14 04:00:41 +00:00
trivial: Fall back to the system config file
This makes trying the daemon locally much easier.
This commit is contained in:
parent
47a0ed78c6
commit
c7f61b62db
@ -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)) {
|
||||
|
Loading…
Reference in New Issue
Block a user