From d0df8d3a62fd156029fb1422cd786d3f351b17fe Mon Sep 17 00:00:00 2001 From: fujiwarat Date: Fri, 27 Apr 2012 11:27:03 +0900 Subject: [PATCH] Enable to fall back /etc/machine-id http://cgit.freedesktop.org/dbus/dbus/commit/dbus/dbus-sysdeps-unix.c?id=66e52541d5bdd4927a5c702963749760643313f4 BUG=http://code.google.com/p/ibus/issues/detail?id=1389 TEST=Linux desktop Review URL: https://codereview.appspot.com/6111060 --- src/ibusshare.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/ibusshare.c b/src/ibusshare.c index 95f98d3..ce332ba 100644 --- a/src/ibusshare.c +++ b/src/ibusshare.c @@ -44,7 +44,11 @@ ibus_get_local_machine_id (void) if (!g_file_get_contents ("/var/lib/dbus/machine-id", &machine_id, NULL, - &error)) { + &error) && + !g_file_get_contents ("/etc/machine-id", + &machine_id, + NULL, + NULL)) { g_warning ("Unable to load /var/lib/dbus/machine-id: %s", error->message); g_error_free (error); machine_id = "machine-id"; -- 2.7.4