From: Ray Strode Date: Sat, 2 Jun 2012 15:15:56 +0000 (-0400) Subject: systemd: pull units from systemd tree X-Git-Tag: 0.8.5~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=29f832fc7459926589e378d4340e24ef167f082c;p=thirdparty%2Fplymouth.git systemd: pull units from systemd tree Kay and Lenny want the service files shipped with plymouth instead of systemd, so toss them into the tree. --- diff --git a/Makefile.am b/Makefile.am index 3bc0be0e..b322463b 100644 --- a/Makefile.am +++ b/Makefile.am @@ -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 \ diff --git a/configure.ac b/configure.ac index c37c694d..f5e82469 100644 --- a/configure.ac +++ b/configure.ac @@ -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 index 00000000..bb1c8a99 --- /dev/null +++ b/systemd-units/Makefile.am @@ -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 index 00000000..8fd6c48e --- /dev/null +++ b/systemd-units/plymouth-halt.service.in @@ -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 index 00000000..6ee0461a --- /dev/null +++ b/systemd-units/plymouth-kexec.service.in @@ -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 index 00000000..3e2a83c0 --- /dev/null +++ b/systemd-units/plymouth-poweroff.service.in @@ -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 index 00000000..9fc20e70 --- /dev/null +++ b/systemd-units/plymouth-quit-wait.service.in @@ -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 index 00000000..cf9901ef --- /dev/null +++ b/systemd-units/plymouth-quit.service.in @@ -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 index 00000000..b46d3f93 --- /dev/null +++ b/systemd-units/plymouth-read-write.service.in @@ -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 index 00000000..a6e86e48 --- /dev/null +++ b/systemd-units/plymouth-reboot.service.in @@ -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 index 00000000..f2c6c84e --- /dev/null +++ b/systemd-units/plymouth-start.service.in @@ -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