plugins/dbus: Start dbus-daemon with absolut path
static void setup(void *arg)
{
- if (!whichp(DAEMON)) {
- _d("Skipping D-Bus plugin, %s is not installed.", DAEMON);
+ char *cmd;
+ char line[80];
+
+ cmd = which(DAEMON);
+ if (!cmd) {
+ _d("Skipping plugin, %s is not installed.", DAEMON);
return;
}
umask(0);
- _d("Starting D-Bus ...");
makedir("/var/run/dbus", 0755);
makedir("/var/lock/subsys", 0755);
makedir("/var/lock/subsys/messagebus", 0755);
@@ -54,7 +57,8 @@ static void setup(void *arg)
erase("/var/run/dbus/pid");
/* Register service with Finit */
- if (service_register(SVC_TYPE_SERVICE, "[S12345] " DAEMON ARGS DESC, NULL))
+ snprintf(line, sizeof(line), "[S12345] %s %s -- %s", DAEMON, ARGS, DESC);
+ if (service_register(SVC_TYPE_SERVICE, line, NULL))
_pe("Failed registering %s", DAEMON);
umask(022);
