dbus: fix for read-only rootfs
authorPeter Korsgaard <jacmet@sunsite.dk>
Mon, 23 Mar 2009 09:44:07 +0000 (09:44 -0000)
committerPeter Korsgaard <jacmet@sunsite.dk>
Mon, 23 Mar 2009 09:44:07 +0000 (09:44 -0000)
Similar to how it's handled by avahi - Make sure /var/lib/dbus is a
symlink to /tmp/dbus.

package/dbus/S30dbus
package/dbus/dbus.mk

index 3b1044bff708624a6b1ad63dde3dfeb6ba30f345..d764e2969be3fc54b9732c003d0ed206b6bdfe2c 100755 (executable)
@@ -16,6 +16,7 @@
 # Create needed directories.
 [ -d /var/run/dbus ] || mkdir -p /var/run/dbus
 [ -d /var/lock/subsys ] || mkdir -p /var/lock/subsys
+[ -d /tmp/dbus ] || mkdir -p /tmp/dbus
 
 RETVAL=0
 
index ef5be59b99da024fe51d68e2fce6c288cd7f0772..b04d67ae56c6c476b1cc281f8948ec54a5567297 100644 (file)
@@ -52,6 +52,8 @@ $(eval $(call AUTOTARGETS,package,dbus))
 
 $(DBUS_HOOK_POST_INSTALL): $(DBUS_TARGET_INSTALL_TARGET)
        rm -rf $(TARGET_DIR)/usr/lib/dbus-1.0
+       rm -rf $(TARGET_DIR)/var/lib/dbus
+       ln -sf /tmp/dbus $(TARGET_DIR)/var/lib/dbus
        $(INSTALL) -m 0755 package/dbus/S30dbus $(TARGET_DIR)/etc/init.d
        touch $@