From: Lennart Poettering Date: Tue, 15 May 2012 12:10:34 +0000 (+0200) Subject: util: /etc/machine-id should be tried first, the D-Bus only as fallback for legacy... X-Git-Url: https://code.delx.au/pulseaudio/commitdiff_plain/10f146ddc889c2300d69198eeedb1672b7f87022 util: /etc/machine-id should be tried first, the D-Bus only as fallback for legacy systems --- diff --git a/configure.ac b/configure.ac index 1936d7c2..8f680a2a 100644 --- a/configure.ac +++ b/configure.ac @@ -945,9 +945,9 @@ AC_SUBST(HAVE_DBUS) AM_CONDITIONAL([HAVE_DBUS], [test "x$HAVE_DBUS" = x1]) AS_IF([test "x$HAVE_DBUS" = "x1"], AC_DEFINE([HAVE_DBUS], 1, [Have D-Bus.])) -PA_MACHINE_ID="${localstatedir}/lib/dbus/machine-id" +PA_MACHINE_ID="${sysconfdir}/machine-id" AX_DEFINE_DIR(PA_MACHINE_ID, PA_MACHINE_ID, [D-Bus machine-id file]) -PA_MACHINE_ID_FALLBACK="${sysconfdir}/machine-id" +PA_MACHINE_ID_FALLBACK="${localstatedir}/lib/dbus/machine-id" AX_DEFINE_DIR(PA_MACHINE_ID_FALLBACK, PA_MACHINE_ID_FALLBACK, [Fallback machine-id file]) diff --git a/src/pulsecore/core-util.c b/src/pulsecore/core-util.c index 2900e3cd..fe68965c 100644 --- a/src/pulsecore/core-util.c +++ b/src/pulsecore/core-util.c @@ -2726,9 +2726,9 @@ char *pa_machine_id(void) { /* The returned value is supposed be some kind of ascii identifier * that is unique and stable across reboots. */ - /* First we try the D-Bus UUID, which is the best option we have, - * since it fits perfectly our needs and is not as volatile as the - * hostname which might be set from dhcp. */ + /* First we try the /etc/machine-id, which is the best option we + * have, since it fits perfectly our needs and is not as volatile + * as the hostname which might be set from dhcp. */ if ((f = pa_fopen_cloexec(PA_MACHINE_ID, "r")) || (f = pa_fopen_cloexec(PA_MACHINE_ID_FALLBACK, "r"))) {