[PATCH] dbus-1.4.6 rc script missing full path to dbus-uuidgen

Michal Varga varga.michal at gmail.com
Thu Jun 2 21:22:49 UTC 2011


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)




More information about the freebsd-gnome mailing list