[Lunar-commits] <moonbase> dbus: MAJOR FIX! Move system socket

Zachary McGrew zmcgrew at lunar-linux.org
Thu Dec 30 00:50:32 CET 2010


commit 80c1b6cb95553c4f727a5ae51a272e41e61f51f4
Author: Zachary McGrew <zmcgrew at lunar-linux.org>
Date:   Wed Dec 8 00:33:47 2010 -0800

    dbus: MAJOR FIX! Move system socket
    
    This commit moves the system socket to /var/run/dbus/ instead of /var/lib/dbus
    With the socket in /var/lib/dbus/ things like polkit, consolekit, udisks, etc. fail to work.
    
    This also changes the init script to recreate the /var/run/dbus directory since we have /var/run as tmpfs
---
 devel/dbus/BUILD             |    6 +++---
 devel/dbus/init.d/messagebus |    5 +++++
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/devel/dbus/BUILD b/devel/dbus/BUILD
index 7f94161..1aa82cf 100644
--- a/devel/dbus/BUILD
+++ b/devel/dbus/BUILD
@@ -6,7 +6,7 @@
 
   OPTS="$OPTS --enable-checks --with-xml=expat                       \
         --with-system-pid-file=/var/run/messagebus.pid               \
-        --with-system-socket=/var/lib/dbus/system_bus_socket         \
+        --localstatedir=/var --enable-inotify --disable-dnotify      \
         --with-session-socket-dir=/tmp  --with-dbus-user=messagebus  \
         --disable-xml-docs --with-init-scripts=none --disable-verbose-mode"
 
@@ -15,8 +15,8 @@
   # The following used to be in POST_INSTALL but the service wasn't starting
   # on FIRST install due to the lack of existing /var/lib/dbus
   add_priv_user messagebus:messagebus -d /dev/null -s /bin/false  &&
-  mkdir -p /var/lib/dbus  &&
-  chown -R messagebus:messagebus /var/lib/dbus  &&
+  mkdir -p /var/run/dbus  &&
+  chown -R messagebus:messagebus /var/run/dbus  &&
 
   mkdir -p /etc/X11/xinit/xinitrc.d/  &&
   install -m755 $SCRIPT_DIRECTORY/30-dbus /etc/X11/xinit/xinitrc.d/
diff --git a/devel/dbus/init.d/messagebus b/devel/dbus/init.d/messagebus
index 6d85088..d47b02f 100644
--- a/devel/dbus/init.d/messagebus
+++ b/devel/dbus/init.d/messagebus
@@ -17,6 +17,11 @@ start () {
   if [ -x /usr/bin/dbus-uuidgen ] ; then
     /usr/bin/dbus-uuidgen --ensure
   fi
+
+  #Create /var/run/dbus since /var/run is tmpfs
+  install -m 755 -d /var/run/dbus
+  chown messagebus:messagebus /var/run/dbus
+
   dbus-daemon $ARGS &> /dev/null
   if [ $? == 0 ] ; then
     mkpid


More information about the Lunar-commits mailing list