Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 02 Jun 2011 23:22:44 +0200
From:      Michal Varga <varga.michal@gmail.com>
To:        gnome@freebsd.org
Subject:   [PATCH] dbus-1.4.6 rc script missing full path to dbus-uuidgen
Message-ID:  <1307049764.24710.13.camel@xenon>

next in thread | raw e-mail | index | archive | help
Hi,
our "/usr/local/etc/rc.d/dbus" is missing a proper path to 
"dbus-uuidgen", which renders it unable to generate a machine id upon
startup, which in turn breaks (at least) ConsoleKit authorizations
further inside user's session.

This might have been responsible for a few bug reports in the past,
namely those "shutdown buttons are missing from my gnome", as being
unable to communicate with ConsoleKit turns into one of those symptoms.

Anyway, the fix is trivial, reproduction steps and patch included:


# rm -fv /var/db/dbus/machine-id
/var/db/dbus/machine-id

# shutdown -r now

Resulting dmesg:
  [...snip...]
  Starting syslogd.
  Clearing /tmp.
  Starting openntpd.
  dbus-uuidgen: not found
  Starting dbus.
  Starting hald.


Let's patch our rc:
--- /usr/local/etc/rc.d/dbus	2011-05-29 18:57:43.000000000 +0200
+++ /usr/local/etc/rc.d/dbus.new	2011-06-02 22:58:30.000000000 +0200
@@ -31,7 +31,7 @@
         mkdir -p /var/db/dbus
     fi
     if [ ! -f /var/db/dbus/machine-id ]; then
-        dbus-uuidgen > /var/db/dbus/machine-id
+        /usr/local/bin/dbus-uuidgen > /var/db/dbus/machine-id
     fi
 
     mkdir -p $(dirname $pidfile)


And try it again:
# shutdown -r now

Resulting dmesg:
  [...snip...]
  Starting syslogd.
  Clearing /tmp.
  Starting openntpd.
  Starting dbus.
  Starting hald.


# ls -l /var/db/dbus/machine-id 
-rw-r--r--  1 root  wheel  33 Jun  2 23:01 /var/db/dbus/machine-id


m.


-- 
Michal Varga,
Stonehenge (Gmail account)





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1307049764.24710.13.camel>