From afedbb80497e0a26f2026336943b1e37a8e696af Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Fri, 3 Sep 2010 19:24:18 +0200 Subject: systemd: install unit files for CK logging calls This follows the basic scheme of the Upstart scripts we already ship --- data/.gitignore | 3 ++ data/Makefile.am | 38 ++++++++++++++++++++++++-- data/console-kit-log-system-restart.service.in | 9 ++++++ data/console-kit-log-system-start.service.in | 9 ++++++ data/console-kit-log-system-stop.service.in | 9 ++++++ 5 files changed, 66 insertions(+), 2 deletions(-) create mode 100644 data/console-kit-log-system-restart.service.in create mode 100644 data/console-kit-log-system-start.service.in create mode 100644 data/console-kit-log-system-stop.service.in (limited to 'data') 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 -- cgit v1.2.3