/[gentoo-alt]/trunk/overlay/sys-apps/dbus/files/dbus.init-0.61
Gentoo

Contents of /trunk/overlay/sys-apps/dbus/files/dbus.init-0.61

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1309 - (show annotations) (download)
Thu Jul 20 01:47:34 2006 UTC (8 years, 5 months ago) by flameeyes
File size: 1377 byte(s)
Add dbus with patch from bug #140570 thanks to Timothy Redaelli.
1 #!/sbin/runscript
2 # Copyright 1999-2004 Gentoo Foundation
3 # Distributed under the terms of the GNU General Public License, v2 or later
4 # $Header: /var/cvsroot/gentoo-x86/sys-apps/dbus/files/dbus.init-0.61,v 1.2 2006/04/21 22:02:36 steev Exp $
5
6 opts="reload"
7
8 depend() {
9 after nscd dns
10 }
11
12 start() {
13 ebegin "Starting D-BUS system messagebus"
14
15 # We need to test if /var/run/dbus exists, since script will fail if it does not
16 [[ ! -e /var/run/dbus ]] && mkdir /var/run/dbus
17
18 start-stop-daemon --start --pidfile /var/run/dbus.pid --exec /usr/bin/dbus-daemon -- --system
19 eend $?
20 }
21
22 stop() {
23 local retval
24
25 ebegin "Stopping D-BUS system messagebus"
26
27 start-stop-daemon --stop --pidfile /var/run/dbus.pid
28 retval=$?
29
30 eend ${retval}
31
32 # This should vanish when baselayout-1.12.0 is marked stable.
33 [[ -f /var/run/dbus.pid ]] && rm -f /var/run/dbus.pid
34
35 # Changes to the system dbus socket run file force us to take care of both
36 [[ -S /var/lib/dbus/system_bus_socket ]] && rm -f /var/lib/dbus/system_bus_socket
37 [[ -S /var/run/dbus/system_bus_socket ]] && rm -f /var/run/dbus/system_bus_socket
38
39 return ${retval}
40 }
41
42 reload() {
43 local retval
44
45 ebegin "Reloading D-BUS messagebus config"
46
47 dbus-send --print-reply --system --type=method_call \
48 --dest=org.freedesktop.DBus \
49 / org.freedesktop.DBus.ReloadConfig > /dev/null
50 retval=$?
51 eend ${retval}
52 return ${retval}
53 }

  ViewVC Help
Powered by ViewVC 1.1.20