diff --git a/package/psplash/psplash-quit.service b/package/psplash/psplash-quit.service new file mode 100644 index 000000000..14bd4994b --- /dev/null +++ b/package/psplash/psplash-quit.service @@ -0,0 +1,11 @@ +[Unit] +Description=Terminate Psplash Boot Screen +After=psplash-start.service + +[Service] +Type=oneshot +ExecStart=/usr/bin/psplash-write QUIT +TimeoutSec=20 + +[Install] +WantedBy=multi-user.target diff --git a/package/psplash/psplash-start.service b/package/psplash/psplash-start.service new file mode 100644 index 000000000..2de3cfce2 --- /dev/null +++ b/package/psplash/psplash-start.service @@ -0,0 +1,11 @@ +[Unit] +Description=Starts Psplash Boot screen +Wants=systemd-vconsole-setup.service +After=systemd-vconsole-setup.service systemd-udev-trigger.service systemd-udevd.service +DefaultDependencies=no + +[Service] +ExecStart=/usr/bin/psplash -n + +[Install] +WantedBy=sysinit.target diff --git a/package/psplash/psplash.mk b/package/psplash/psplash.mk index 83b6f79c6..b7562660d 100644 --- a/package/psplash/psplash.mk +++ b/package/psplash/psplash.mk @@ -9,4 +9,18 @@ PSPLASH_SITE = git://git.yoctoproject.org/psplash PSPLASH_LICENSE = GPLv2+ PSPLASH_AUTORECONF = YES +define PSPLASH_INSTALL_INIT_SYSTEMD + $(INSTALL) -D -m 644 package/psplash/psplash-start.service \ + $(TARGET_DIR)/etc/systemd/system/psplash-start.service + $(INSTALL) -d $(TARGET_DIR)/etc/systemd/system/sysinit.target.wants + ln -sf ../psplash-start.service \ + $(TARGET_DIR)/etc/systemd/system/sysinit.target.wants/ + + $(INSTALL) -D -m 644 package/psplash/psplash-quit.service \ + $(TARGET_DIR)/etc/systemd/system/psplash-quit.service + $(INSTALL) -d $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants + ln -sf ../psplash-quit.service \ + $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/ +endef + $(eval $(autotools-package))