diff options
author | Lennart Poettering <lennart@poettering.net> | 2010-09-03 19:24:18 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2010-09-05 23:19:47 +0200 |
commit | afedbb80497e0a26f2026336943b1e37a8e696af (patch) | |
tree | daef0c503c8b4c9ac10066bf2d3a9f42561178ef | |
parent | 5a81bb666df3d8469d282e63d452ac2dea96b313 (diff) |
systemd: install unit files for CK logging calls
This follows the basic scheme of the Upstart scripts we already ship
-rw-r--r-- | data/.gitignore | 3 | ||||
-rw-r--r-- | data/Makefile.am | 38 | ||||
-rw-r--r-- | data/console-kit-log-system-restart.service.in | 9 | ||||
-rw-r--r-- | data/console-kit-log-system-start.service.in | 9 | ||||
-rw-r--r-- | data/console-kit-log-system-stop.service.in | 9 |
5 files changed, 66 insertions, 2 deletions
diff --git a/data/.gitignore b/data/.gitignore index ca30d37..ea9a596 100644 --- a/data/.gitignore +++ b/data/.gitignore @@ -3,3 +3,6 @@ Makefile.in ConsoleKit org.freedesktop.ConsoleKit.service console-kit-daemon.service +console-kit-log-system-start.service +console-kit-log-system-stop.service +console-kit-log-system-restart.service diff --git a/data/Makefile.am b/data/Makefile.am index 8c0490a..bf9e43b 100644 --- a/data/Makefile.am +++ b/data/Makefile.am @@ -22,11 +22,37 @@ $(service_DATA): $(service_in_files) Makefile if HAVE_SYSTEMD systemdsystemunit_DATA = \ - console-kit-daemon.service + console-kit-daemon.service \ + console-kit-log-system-start.service \ + console-kit-log-system-stop.service \ + console-kit-log-system-restart.service console-kit-daemon.service: console-kit-daemon.service.in $(edit) $< >$@ +console-kit-log-system-start.service: console-kit-log-system-start.service.in + $(edit) $< >$@ + +console-kit-log-system-stop.service: console-kit-log-system-stop.service.in + $(edit) $< >$@ + +console-kit-log-system-restart.service: console-kit-log-system-restart.service.in + $(edit) $< >$@ + +install-data-hook: + $(MKDIR_P) -m 755 \ + $(DESTDIR)$(systemdsystemunitdir)/basic.target.wants \ + $(DESTDIR)$(systemdsystemunitdir)/halt.target.wants \ + $(DESTDIR)$(systemdsystemunitdir)/poweroff.target.wants \ + $(DESTDIR)$(systemdsystemunitdir)/reboot.target.wants + ( cd $(DESTDIR)$(systemdsystemunitdir)/basic.target.wants && \ + $(LN_S) ../console-kit-log-system-start.service ) + ( cd $(DESTDIR)$(systemdsystemunitdir)/halt.target.wants && \ + $(LN_S) ../console-kit-log-system-stop.service ) + ( cd $(DESTDIR)$(systemdsystemunitdir)/poweroff.target.wants && \ + $(LN_S) ../console-kit-log-system-stop.service ) + ( cd $(DESTDIR)$(systemdsystemunitdir)/reboot.target.wants && \ + $(LN_S) ../console-kit-log-system-restart.service ) endif edit = sed \ @@ -43,10 +69,18 @@ EXTRA_DIST = \ $(seat_DATA) \ $(service_in_files) \ console-kit-daemon.service.in \ + console-kit-log-system-start.service.in \ + console-kit-log-system-stop.service.in \ + console-kit-log-system-restart.service.in \ $(NULL) MAINTAINERCLEANFILES = \ *~ \ Makefile.in -CLEANFILES = $(service_DATA) console-kit-daemon.service +CLEANFILES = \ + $(service_DATA) \ + console-kit-daemon.service \ + console-kit-log-system-start.service \ + console-kit-log-system-stop.service \ + console-kit-log-system-restart.service diff --git a/data/console-kit-log-system-restart.service.in b/data/console-kit-log-system-restart.service.in new file mode 100644 index 0000000..905b330 --- /dev/null +++ b/data/console-kit-log-system-restart.service.in @@ -0,0 +1,9 @@ +[Unit] +Description=Console System Reboot Logging +DefaultDependencies=no +Before=poweroff.service reboot.service halt.service killall.service +After=console-kit-system-start.service + +[Service] +Type=oneshot +ExecStart=@sbindir@/ck-log-system-restart diff --git a/data/console-kit-log-system-start.service.in b/data/console-kit-log-system-start.service.in new file mode 100644 index 0000000..f0697ac --- /dev/null +++ b/data/console-kit-log-system-start.service.in @@ -0,0 +1,9 @@ +[Unit] +Description=Console System Startup Logging +DefaultDependencies=no +Before=poweroff.service reboot.service halt.service killall.service +After=local-fs.target + +[Service] +Type=oneshot +ExecStart=@sbindir@/ck-log-system-start diff --git a/data/console-kit-log-system-stop.service.in b/data/console-kit-log-system-stop.service.in new file mode 100644 index 0000000..3292238 --- /dev/null +++ b/data/console-kit-log-system-stop.service.in @@ -0,0 +1,9 @@ +[Unit] +Description=Console System Shutdown Logging +DefaultDependencies=no +Before=poweroff.service reboot.service halt.service killall.service +After=console-kit-system-start.service + +[Service] +Type=oneshot +ExecStart=@sbindir@/ck-log-system-stop |