summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrancesco Giudici <fgiudici@redhat.com>2018-03-23 11:09:26 +0100
committerFrancesco Giudici <fgiudici@redhat.com>2018-03-23 18:29:30 +0100
commit1a2a53e64d041ca923eb9cd7f13f39d51d8e95db (patch)
tree394bdab7f48f9407a1bd64468a53ac6c11ae6bb9
parentc5457fcadb78fb37b4aa4b6307b4b8163acdadcb (diff)
downloadNetworkManager-1a2a53e64d041ca923eb9cd7f13f39d51d8e95db.tar.gz
core: retrieve the machine-id from static path
when reading the machine-id search for it in static paths: we already do that for /etc/machine-id, do it also for /var/lib/dbus/machine-id, as we don't want to follow a possibly changing LOCALSTATEDIR for it.
-rw-r--r--src/nm-core-utils.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nm-core-utils.c b/src/nm-core-utils.c
index f3e9e5f75e..a2e1f449e8 100644
--- a/src/nm-core-utils.c
+++ b/src/nm-core-utils.c
@@ -2694,10 +2694,10 @@ nm_utils_machine_id_read (void)
/* Get the machine ID from /etc/machine-id; it's always in /etc no matter
* where our configured SYSCONFDIR is. Alternatively, it might be in
- * LOCALSTATEDIR /lib/dbus/machine-id.
+ * /var/lib/dbus/machine-id.
*/
if ( !g_file_get_contents ("/etc/machine-id", &contents, NULL, NULL)
- && !g_file_get_contents (LOCALSTATEDIR "/lib/dbus/machine-id", &contents, NULL, NULL))
+ && !g_file_get_contents ("/var/lib/dbus/machine-id", &contents, NULL, NULL))
return FALSE;
contents = g_strstrip (contents);