#!/bin/sh DAEMON=dbus DAEMON_BIN=dbus-daemon DAEMON_LONG_NAME=D-Bus PID_FILE=/var/run/dbus/pid . /etc/init.d/modlibrc startdaemon_pre() { [ ! -x /usr/bin/dbus-uuidgen ] && return 0 /usr/bin/dbus-uuidgen --ensure } start() { modlib_startdaemon $DAEMON_BIN --system } case $1 in ""|load) modlib_add_user_and_group nobody if [ ! -d /tmp/flash/dbus-1 ]; then mkdir -p /tmp/flash/dbus-1 cp -a /etc/config-template.dbus/* /tmp/flash/dbus-1/ fi mkdir -p /var/run/dbus /var/lib/dbus modreg cgi $DAEMON "$DAEMON_LONG_NAME" modreg daemon $DAEMON modlib_start $DBUS_ENABLED ;; unload) modunreg daemon $DAEMON modunreg cgi $DAEMON modlib_stop ;; start) modlib_start ;; stop) modlib_stop ;; restart) modlib_restart ;; status) modlib_status ;; *) echo "Usage: $0 [start|stop|restart|load|unload|status]" 1>&2 exit 1 ;; esac exit 0