]> code.delx.au - pulseaudio/blobdiff - src/pulsecore/core-util.c
core: Look up /etc/machine-id if D-Bus machine-id is not found
[pulseaudio] / src / pulsecore / core-util.c
index 79c8e0820e7d902f8fcd41b8612762b69535a21f..01731350d4819535cff8dfee500851644a0bbb7c 100644 (file)
@@ -2717,7 +2717,8 @@ char *pa_machine_id(void) {
      * 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"))) {
+    if ((f = pa_fopen_cloexec(PA_MACHINE_ID, "r")) ||
+        (f = pa_fopen_cloexec(PA_MACHINE_ID_FALLBACK, "r"))) {
         char ln[34] = "", *r;
 
         r = fgets(ln, sizeof(ln)-1, f);