diff options
author | Lennart Poettering <lennart@poettering.net> | 2010-07-21 16:55:44 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2010-08-12 00:10:35 +0200 |
commit | 5a81bb666df3d8469d282e63d452ac2dea96b313 (patch) | |
tree | f860fc43670313a1104050f5da9aa2aa05df8d3e | |
parent | 30f0968b9a7f544d1afc8908888dc403be6112b8 (diff) |
systemd: install systemd unit files
-rw-r--r-- | Makefile.am | 3 | ||||
-rw-r--r-- | configure.ac | 9 | ||||
-rw-r--r-- | data/.gitignore | 1 | ||||
-rw-r--r-- | data/Makefile.am | 12 | ||||
-rw-r--r-- | data/console-kit-daemon.service.in | 15 | ||||
-rw-r--r-- | data/org.freedesktop.ConsoleKit.service.in | 1 |
6 files changed, 40 insertions, 1 deletions
diff --git a/Makefile.am b/Makefile.am index be2efff..9f13e2c 100644 --- a/Makefile.am +++ b/Makefile.am @@ -63,3 +63,6 @@ $(srcdir)/ChangeLog: fi .PHONY: ChangeLog $(srcdir)/ChangeLog + +DISTCHECK_CONFIGURE_FLAGS = \ + --with-systemdsystemunitdir=$$dc_install_base/$(systemdsystemunitdir) diff --git a/configure.ac b/configure.ac index 117d788..17afab8 100644 --- a/configure.ac +++ b/configure.ac @@ -391,6 +391,15 @@ AC_SUBST(CFLAGS) AC_SUBST(CPPFLAGS) AC_SUBST(LDFLAGS) +# systemd + +AC_ARG_WITH([systemdsystemunitdir], + AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [Directory for systemd service files]), + [], + [with_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)]) +AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir]) +AM_CONDITIONAL(HAVE_SYSTEMD, [test -n "$with_systemdsystemunitdir"]) + # Files AC_CONFIG_FILES([ diff --git a/data/.gitignore b/data/.gitignore index b8028aa..ca30d37 100644 --- a/data/.gitignore +++ b/data/.gitignore @@ -2,3 +2,4 @@ Makefile Makefile.in ConsoleKit org.freedesktop.ConsoleKit.service +console-kit-daemon.service diff --git a/data/Makefile.am b/data/Makefile.am index 041b431..8c0490a 100644 --- a/data/Makefile.am +++ b/data/Makefile.am @@ -20,6 +20,15 @@ service_DATA = $(service_in_files:.service.in=.service) $(service_DATA): $(service_in_files) Makefile $(edit) $< >$@ +if HAVE_SYSTEMD +systemdsystemunit_DATA = \ + console-kit-daemon.service + +console-kit-daemon.service: console-kit-daemon.service.in + $(edit) $< >$@ + +endif + edit = sed \ -e 's|@sbindir[@]|$(sbindir)|g' \ -e 's|@sysconfdir[@]|$(sysconfdir)|g' \ @@ -33,10 +42,11 @@ EXTRA_DIST = \ $(dbusconf_DATA) \ $(seat_DATA) \ $(service_in_files) \ + console-kit-daemon.service.in \ $(NULL) MAINTAINERCLEANFILES = \ *~ \ Makefile.in -CLEANFILES = $(service_DATA) +CLEANFILES = $(service_DATA) console-kit-daemon.service diff --git a/data/console-kit-daemon.service.in b/data/console-kit-daemon.service.in new file mode 100644 index 0000000..a08ec5c --- /dev/null +++ b/data/console-kit-daemon.service.in @@ -0,0 +1,15 @@ +[Unit] +Description=Console Manager +After=syslog.target + +[Service] +Type=dbus +BusName=org.freedesktop.ConsoleKit +ExecStart=@sbindir@/console-kit-daemon --no-daemon + +[Install] +# We pull this in by graphical.target instead of waiting for the bus +# activation, to speed things up a little: gdm uses this anyway so it is nice +# if it is already around when gdm wants to use it and doesn't have to wait for +# it. +WantedBy=graphical.target diff --git a/data/org.freedesktop.ConsoleKit.service.in b/data/org.freedesktop.ConsoleKit.service.in index d716a36..5e35ebb 100644 --- a/data/org.freedesktop.ConsoleKit.service.in +++ b/data/org.freedesktop.ConsoleKit.service.in @@ -2,3 +2,4 @@ Name=org.freedesktop.ConsoleKit Exec=@sbindir@/console-kit-daemon --no-daemon User=root +SystemdService=console-kit-daemon.service |