]> git.ipfire.org Git - thirdparty/plymouth.git/commitdiff
systemd: pull units from systemd tree
authorRay Strode <rstrode@redhat.com>
Sat, 2 Jun 2012 15:15:56 +0000 (11:15 -0400)
committerRay Strode <rstrode@redhat.com>
Wed, 6 Jun 2012 14:12:59 +0000 (10:12 -0400)
Kay and Lenny want the service files shipped with plymouth
instead of systemd, so toss them into the tree.

Makefile.am
configure.ac
systemd-units/Makefile.am [new file with mode: 0644]
systemd-units/plymouth-halt.service.in [new file with mode: 0644]
systemd-units/plymouth-kexec.service.in [new file with mode: 0644]
systemd-units/plymouth-poweroff.service.in [new file with mode: 0644]
systemd-units/plymouth-quit-wait.service.in [new file with mode: 0644]
systemd-units/plymouth-quit.service.in [new file with mode: 0644]
systemd-units/plymouth-read-write.service.in [new file with mode: 0644]
systemd-units/plymouth-reboot.service.in [new file with mode: 0644]
systemd-units/plymouth-start.service.in [new file with mode: 0644]

index 3bc0be0ec955ada8fcf7fdda1d9d1a12b2f1919d..b322463b6012437556e6ef9909bf2bbfbf9a7093 100644 (file)
@@ -1,4 +1,5 @@
-SUBDIRS = src themes images scripts docs
+SUBDIRS = src themes images scripts docs systemd-units
+
 DISTCHECK_CONFIGURE_FLAGS = --disable-tests --without-system-root-install
 
 EXTRA_DIST = ChangeLog                                                         \
index c37c694dbfe680e6b7242d410575e907e66ba9c8..f5e8246955778325c813ded46dfb8ef5ddc502ef 100644 (file)
@@ -248,6 +248,8 @@ AM_CONDITIONAL(ENABLE_SYSTEMD_INTEGRATION, [test "$enable_systemd_integration" =
 
 if test x$enable_systemd_integration = xyes; then
   AC_DEFINE(PLY_ENABLE_SYSTEMD_INTEGRATION, 1, [Coordinate boot up with systemd])
+  SYSTEMD_UNIT_DIR=/lib/systemd/system
+  AC_SUBST(SYSTEMD_UNIT_DIR)
 fi
 
 AC_ARG_WITH(system-root-install, AS_HELP_STRING([--with-system-root-install],[Install client in /bin and daemon in /sbin]),with_system_root_install=${withval},with_system_root_install=yes)
@@ -445,6 +447,15 @@ AC_CONFIG_FILES([Makefile
           scripts/plymouth-populate-initrd
           scripts/plymouth-set-default-theme
            scripts/Makefile
+           systemd-units/plymouth-halt.service
+           systemd-units/plymouth-kexec.service
+           systemd-units/plymouth-poweroff.service
+           systemd-units/plymouth-quit.service
+           systemd-units/plymouth-quit-wait.service
+           systemd-units/plymouth-read-write.service
+           systemd-units/plymouth-reboot.service
+           systemd-units/plymouth-start.service
+           systemd-units/Makefile
            docs/Makefile
 ])
 AC_OUTPUT
diff --git a/systemd-units/Makefile.am b/systemd-units/Makefile.am
new file mode 100644 (file)
index 0000000..bb1c8a9
--- /dev/null
@@ -0,0 +1,17 @@
+systemd_unit_templates =                                                     \
+        plymouth-start.service.in                                            \
+        plymouth-read-write.service.in                                       \
+        plymouth-quit.service.in                                             \
+        plymouth-quit-wait.service.in                                        \
+        plymouth-reboot.service.in                                           \
+        plymouth-kexec.service.in                                            \
+        plymouth-poweroff.service.in                                         \
+        plymouth-halt.service.in
+
+if ENABLE_SYSTEMD_INTEGRATION
+systemdunitdir=$(SYSTEMD_UNIT_DIR)
+systemdunit_DATA = $(systemd_unit_templates:.service.in=.service)
+endif
+
+EXTRA_DIST = $(systemd_unit_templates) $(systemdunit_DATA)
+DISTCLEANFILES=$(systemdunit_DATA)
diff --git a/systemd-units/plymouth-halt.service.in b/systemd-units/plymouth-halt.service.in
new file mode 100644 (file)
index 0000000..8fd6c48
--- /dev/null
@@ -0,0 +1,11 @@
+[Unit]
+Description=Show Plymouth Halt Screen
+After=getty@tty1.service prefdm.service plymouth-start.service
+Before=halt.service
+DefaultDependencies=no
+ConditionKernelCommandLine=!plymouth.enable=0
+
+[Service]
+ExecStart=@PLYMOUTH_DAEMON_DIR@/plymouthd --mode=shutdown --attach-to-session
+ExecStartPost=-@PLYMOUTH_CLIENT_DIR@/plymouth show-splash
+Type=forking
diff --git a/systemd-units/plymouth-kexec.service.in b/systemd-units/plymouth-kexec.service.in
new file mode 100644 (file)
index 0000000..6ee0461
--- /dev/null
@@ -0,0 +1,11 @@
+[Unit]
+Description=Show Plymouth Reboot with kexec Screen
+After=getty@tty1.service prefdm.service plymouth-start.service
+Before=kexec.service
+DefaultDependencies=no
+ConditionKernelCommandLine=!plymouth.enable=0
+
+[Service]
+ExecStart=@PLYMOUTH_DAEMON_DIR@/plymouthd --mode=shutdown --attach-to-session
+ExecStartPost=-@PLYMOUTH_CLIENT_DIR@/plymouth show-splash
+Type=forking
diff --git a/systemd-units/plymouth-poweroff.service.in b/systemd-units/plymouth-poweroff.service.in
new file mode 100644 (file)
index 0000000..3e2a83c
--- /dev/null
@@ -0,0 +1,11 @@
+[Unit]
+Description=Show Plymouth Power Off Screen
+After=getty@tty1.service prefdm.service plymouth-start.service
+Before=poweroff.service
+DefaultDependencies=no
+ConditionKernelCommandLine=!plymouth.enable=0
+
+[Service]
+ExecStart=@PLYMOUTH_DAEMON_DIR@/plymouthd --mode=shutdown --attach-to-session
+ExecStartPost=-@PLYMOUTH_CLIENT_DIR@/plymouth show-splash
+Type=forking
diff --git a/systemd-units/plymouth-quit-wait.service.in b/systemd-units/plymouth-quit-wait.service.in
new file mode 100644 (file)
index 0000000..9fc20e7
--- /dev/null
@@ -0,0 +1,8 @@
+[Unit]
+Description=Wait for Plymouth Boot Screen to Quit
+After=rc-local.service plymouth-start.service systemd-user-sessions.service
+
+[Service]
+ExecStart=-@PLYMOUTH_CLIENT_DIR@/plymouth --wait
+Type=oneshot
+TimeoutSec=20
diff --git a/systemd-units/plymouth-quit.service.in b/systemd-units/plymouth-quit.service.in
new file mode 100644 (file)
index 0000000..cf9901e
--- /dev/null
@@ -0,0 +1,8 @@
+[Unit]
+Description=Terminate Plymouth Boot Screen
+After=rc-local.service plymouth-start.service systemd-user-sessions.service
+
+[Service]
+ExecStart=-@PLYMOUTH_CLIENT_DIR@/plymouth quit
+Type=oneshot
+TimeoutSec=20
diff --git a/systemd-units/plymouth-read-write.service.in b/systemd-units/plymouth-read-write.service.in
new file mode 100644 (file)
index 0000000..b46d3f9
--- /dev/null
@@ -0,0 +1,9 @@
+[Unit]
+Description=Tell Plymouth To Write Out Runtime Data
+DefaultDependencies=no
+After=local-fs.target
+Before=sysinit.target
+
+[Service]
+ExecStart=-@PLYMOUTH_CLIENT_DIR@/plymouth update-root-fs --read-write
+Type=oneshot
diff --git a/systemd-units/plymouth-reboot.service.in b/systemd-units/plymouth-reboot.service.in
new file mode 100644 (file)
index 0000000..a6e86e4
--- /dev/null
@@ -0,0 +1,11 @@
+[Unit]
+Description=Show Plymouth Reboot Screen
+After=getty@tty1.service prefdm.service plymouth-start.service
+Before=reboot.service
+DefaultDependencies=no
+ConditionKernelCommandLine=!plymouth.enable=0
+
+[Service]
+ExecStart=@PLYMOUTH_DAEMON_DIR@/plymouthd --mode=shutdown --attach-to-session
+ExecStartPost=-@PLYMOUTH_CLIENT_DIR@/plymouth show-splash
+Type=forking
diff --git a/systemd-units/plymouth-start.service.in b/systemd-units/plymouth-start.service.in
new file mode 100644 (file)
index 0000000..f2c6c84
--- /dev/null
@@ -0,0 +1,13 @@
+[Unit]
+Description=Show Plymouth Boot Screen
+DefaultDependencies=no
+Wants=systemd-ask-password-plymouth.path
+After=systemd-vconsole-setup.service systemd-udev-settle.service
+Before=systemd-ask-password-plymouth.service
+ConditionKernelCommandLine=!plymouth.enable=0
+ConditionPathExists=!@plymouthruntimedir@/pid
+
+[Service]
+ExecStart=@PLYMOUTH_DAEMON_DIR@/plymouthd --mode=boot --pid-file=@plymouthruntimedir@/pid --attach-to-session
+ExecStartPost=-/bin/udevadm trigger --action=add --attr-match=class=0x030000 ; -/bin/udevadm trigger --action=add --subsystem-match=graphics --subsystem-match=drm --subsystem-match=tty ; -/bin/udevadm settle --timeout=30 ; -@PLYMOUTH_CLIENT_DIR@/plymouth show-splash
+Type=forking