# rcS - runlevel compatibility # # This task runs the old sysv-rc startup scripts. start on stopped routing stop on stopping ifup #stop on runlevel description "use rc file to start dbus-daemon" author "Harald Kueller " # Note: there can be no previous runlevel here, if we have one it's bad # information (we enter rc1 not rcS for maintenance). Run /etc/init.d/rc # without information so that it defaults to previous=N runlevel=S. console output pre-start script if [ -f /var/run/dbus/pid ]; then if [ "`pgrep dbus-daemon`" -eq "`cat /var/run/dbus/pid`" ]; then echo "The dbus deamon is already running with pid `cat /var/run/dbus/pid`" exit 10 else find /var/run/dbus -type f -exec rm {} \; fi fi export PATH=$PATH:/usr/X11R7/bin /usr/X11R7/bin/dbus-launch --config-file /etc/sysconfig/dbus-1/system.conf >/tmp/dbus_startup 2>>/tmp/dbus.debug source /tmp/dbus_startup rm /tmp/dbus_startup echo $DBUS_SESSION_BUS_PID >/var/run/dbus/pid echo "DBUS_SESSION_BUS_ADDRESS='$DBUS_SESSION_BUS_ADDRESS'" \ >/var/run/dbus/address end script post-stop script if [ ! -f /var/run/dbus/pid ]; then echo "dbus is not running!" exit 10 fi kill `cat /var/run/dbus/pid` rm /var/run/dbus/pid rm /var/run/dbus/address end script