recipes: scanning/sane-backends: Added version 1.1.1
[dragora.git] / archive / dbus / rc.main
blobf76386436e2788e5662557a5c818399e0b7e4330
1 #! /bin/sh -
3 # dbus/rc.main
5 # D-Bus daemon.
8 # Redirects the standard error to the standard output
9 exec 2>&1
11 TARGET="$1"
12 SVNAME="${2:-dbus}"
14 start()
16 echo "*** ${SVNAME}: Starting dbus ..."
18 if test ! -e /var/run/dbus
19 then
20 mkdir -p /var/run/dbus || exit $?
23 # Validate or generate unique ID file
24 /usr/bin/dbus-uuidgen --ensure
26 exec /usr/bin/dbus-daemon --nofork --system --nopidfile
29 reset()
31 case $3 in
32 exit)
33 echo "*** ${SVNAME}: Exited status $4"
35 signal)
36 echo "*** ${SVNAME}: Killed on signal $5"
39 echo "*** ${SVNAME}: Stopped (${3})"
41 esac
44 # Branch to target
45 eval ${TARGET} "$@"