diff options
author | Lennart Poettering <lennart@poettering.net> | 2010-07-09 20:37:24 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2010-07-09 23:35:54 +0200 |
commit | bffc52a38536dfe400a6b5219ee44465c9b817b9 (patch) | |
tree | 30e002e8fb116f0089ad08a1288598263042a14c /bus | |
parent | 8e3060a2adec05e676ea9a85594e659336c3cb62 (diff) |
systemd: install systemd socket and service file by default
Diffstat (limited to 'bus')
-rw-r--r-- | bus/.gitignore | 2 | ||||
-rw-r--r-- | bus/Makefile.am | 23 | ||||
-rw-r--r-- | bus/dbus.service.in | 13 | ||||
-rw-r--r-- | bus/dbus.socket.in | 5 |
4 files changed, 39 insertions, 4 deletions
diff --git a/bus/.gitignore b/bus/.gitignore index 0b67447d..ff8d3038 100644 --- a/bus/.gitignore +++ b/bus/.gitignore @@ -21,3 +21,5 @@ system.conf dbus-daemon.1 bus-test-launch-helper bus-test-system +dbus.service +dbus.socket diff --git a/bus/Makefile.am b/bus/Makefile.am index 5a8d04d4..af1878ea 100644 --- a/bus/Makefile.am +++ b/bus/Makefile.am @@ -74,7 +74,7 @@ BUS_SOURCES= \ dbus_daemon_SOURCES= \ $(BUS_SOURCES) \ - main.c + main.c dbus_daemon_CPPFLAGS = -DDBUS_STATIC_BUILD dbus_daemon_LDADD= \ @@ -151,7 +151,7 @@ extra_inst_programs+=dbus-daemon endif ## note that TESTS has special meaning (stuff to use in make check) -## so if adding tests not to be run in make check, don't add them to +## so if adding tests not to be run in make check, don't add them to ## TESTS if DBUS_BUILD_TESTS TESTS_ENVIRONMENT=DBUS_TEST_DATA=$(top_builddir)/test/data DBUS_TEST_HOMEDIR=$(top_builddir)/dbus DBUS_FATAL_WARNINGS=1 DBUS_BLOCK_ON_ABORT=1 @@ -160,7 +160,7 @@ else TESTS= endif -## we use noinst_PROGRAMS not check_PROGRAMS so that we build +## we use noinst_PROGRAMS not check_PROGRAMS so that we build ## even when not doing "make check" noinst_PROGRAMS=$(TESTS) $(extra_noinst_programs) bin_PROGRAMS=$(extra_inst_programs) @@ -219,6 +219,11 @@ if DBUS_UNIX fi \ fi endif +if HAVE_SYSTEMD +# Install dbus.socket as default implementation of a D-Bus stack + $(mkinstalldirs) $(DESTDIR)$(systemdsystemunitdir)/dbus.target.wants + $(LN_S) ../dbus.socket $(DESTDIR)$(systemdsystemunitdir)/dbus.target.wants/dbus.socket +endif #### Init scripts fun SCRIPT_IN_FILES=messagebus.in \ @@ -246,9 +251,19 @@ initd_SCRIPTS= \ endif ## Slackware end +if HAVE_SYSTEMD +SCRIPT_IN_FILES += \ + dbus.service.in \ + dbus.socket.in + +systemdsystemunit_DATA = \ + dbus.service \ + dbus.socket +endif + MAN_IN_FILES=dbus-daemon.1.in man_MANS = dbus-daemon.1 -#### Extra dist +#### Extra dist EXTRA_DIST=$(CONFIG_IN_FILES) $(SCRIPT_IN_FILES) $(man_MANS) $(MAN_IN_FILES) diff --git a/bus/dbus.service.in b/bus/dbus.service.in new file mode 100644 index 00000000..8d70756f --- /dev/null +++ b/bus/dbus.service.in @@ -0,0 +1,13 @@ +[Unit] +Description=D-Bus System Message Bus +Requires=dbus.socket +After=syslog.target + +[Service] +ExecStartPre=@EXPANDED_BINDIR@/dbus-uuidgen --ensure +ExecStart=@EXPANDED_BINDIR@/dbus-daemon --system --address=systemd: --nofork --systemd-activation +ExecReload=@EXPANDED_BINDIR@/dbus-send --print-reply --system --type=method_call --dest=org.freedesktop.DBus / org.freedesktop.DBus.ReloadConfig + +[Install] +WantedBy=multi-user.target +Also=dbus.socket diff --git a/bus/dbus.socket.in b/bus/dbus.socket.in new file mode 100644 index 00000000..5eac60f7 --- /dev/null +++ b/bus/dbus.socket.in @@ -0,0 +1,5 @@ +[Socket] +ListenStream=@DBUS_SYSTEM_SOCKET@ + +[Install] +WantedBy=sockets.target |