Adding support for systemd and its service files
PATCH 1/1 Adding support for systemd and its service files
From: Sujith H <[email protected]>
--- Makefile.am | 8 +++++++- configure.ac | 23 ++++++++++++++++++++++- psplash-quit.service.in | 11 +++++++++++ psplash-start.service.in | 11 +++++++++++ 4 files changed, 51 insertions(+), 2 deletions(-) create mode 100644 psplash-quit.service.in create mode 100644 psplash-start.service.in
Makefile.am +7 -1
@@ -11,8 +11,14 @@ psplash_write_SOURCES = psplash-write.c psplash.h EXTRA_DIST = make-image-header.sh -MAINTAINERCLEANFILES = aclocal.m4 compile config.guess config.sub configure depcomp install-sh ltmain.sh Makefile.in missing +MAINTAINERCLEANFILES = aclocal.m4 compile config.guess config.sub configure depcomp install-sh ltmain.sh Makefile.in missing psplash-quit.service psplash-start.service snapshot: $(MAKE) dist distdir=$(PACKAGE)-snap`date +"%Y%m%d"` +if SYSTEMD +systemdunitdir = @SYSTEMD_UNITDIR@ + +systemdunit_DATA = psplash-quit.service psplash-start.service +endif +
configure.ac +22 -1
@@ -15,6 +15,27 @@ fi AC_SUBST(GCC_FLAGS) +# Check for pkg-config manually first, as if its not installed the +# PKG_PROG_PKG_CONFIG macro won't be defined. +AC_CHECK_PROG(have_pkg_config, pkg-config, yes, no) + +if test x"$have_pkg_config" = "xno"; then + AC_MSG_ERROR(pkg-config is required to install this program) +fi + +# +# systemd +# +AC_ARG_WITH([systemdunitdir], AC_HELP_STRING([--with-systemdunitdir=DIR], + [path to systemd service directory]), [path_systemdunit=${withval}], + [path_systemdunit="`$PKG_CONFIG --variable=systemdsystemunitdir systemd`"]) +if (test -n "${path_systemdunit}"); then + SYSTEMD_UNITDIR="${path_systemdunit}" + AC_SUBST(SYSTEMD_UNITDIR) +fi +AM_CONDITIONAL(SYSTEMD, test -n "${path_systemdunit}") + AC_OUTPUT([ -Makefile +Makefile psplash-quit.service psplash-start.service ]) +
psplash-quit.service.in new file +11 -0
@@ -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
psplash-start.service.in new file +11 -0
@@ -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 + +[Install] +WantedBy=sysinit.target
Signature · 1 line
1.8.4
Anyone who knows what happened with this change? Any problem detected? I was looking into adding support for systemd in psplash and found this old changeset that is not included in the psplash repo yet.
BR, Petter
2014-08-13 13:58 skrev Sujith H:
Quoted 1 line
From: Sujith H
Quoted 2 lines
Signed-off-by Muzaffar Mahmood
Quoted 1 line
Signed-off-by Sujith H
Quoted 3 lines
---
Makefile.am | 8 +++++++-
configure.ac |
23 ++++++++++++++++++++++-
Quoted 2 lines
psplash-quit.service.in | 11 +++++++++++
psplash-start.service.in | 11 +++++++++++
Quoted 1 line
4 files changed, 51
insertions(+), 2 deletions(-)
Quoted 1 line
create mode 100644
psplash-quit.service.in
Makefile.am
Quoted 5 lines
create mode 100644 psplash-start.service.in
Makefile.am +0
-0
100644
Makefile.am
Quoted 3 lines
Makefile.am +0
-0@@ -11,8 +11,14 @@
psplash_write_SOURCES = psplash-write.c psplash.h
Quoted 2 lines
EXTRA_DIST=
make-image-header.sh
Quoted 2 lines
-MAINTAINERCLEANFILES = aclocal.m4 compile
config.guess config.sub configure depcomp install-sh ltmain.sh Makefile.in missing
Quoted 1 line
+MAINTAINERCLEANFILES = aclocal.m4 compile
config.guess config.sub configure depcomp install-sh ltmain.sh Makefile.in missing psplash-quit.service psplash-start.service
Quoted 2 lines
snapshot:
Quoted 3 lines
$(MAKE) dist distdir=$(PACKAGE)-snap
date +"%Y%m%d"
+if SYSTEMD
Makefile.am
Quoted 3 lines
Makefile.am +2
-0+systemdunitdir = @SYSTEMD_UNITDIR@ +
+systemdunit_DATA = psplash-quit.service psplash-start.service
Quoted 1 line
+endif
Quoted 3 lines
Makefile.am +1
-0+configure.ac +0
-0index
1284833..a44c8d4 100644
Quoted 3 lines
configure.ac +0
-0@@
-15,6 +15,27 @@ fi
Quoted 4 lines
AC_SUBST(GCC_FLAGS)+# Check for pkg-config
manually first, as if its not installed the
Quoted 1 line
+#
PKG_PROG_PKG_CONFIG
macro won't be defined.
Quoted 1 line
+AC_CHECK_PROG(have_pkg_config, pkg-config,
yes, no)
configure.ac fi · line 25
Quoted 3 lines
configure.ac +3
-0+ +if test x"$have_pkg_config" = "xno"; then +
AC_MSG_ERROR(pkg-config is required to install this program)
configure.ac
Quoted 3 lines
configure.ac +2
-0+fi +
+#
configure.ac fi
Quoted 3 lines
configure.ac +3
-0+# systemd +# +AC_ARG_WITH([systemdunitdir],
AC_HELP_STRING([--with-systemdunitdir=DIR],
Quoted 1 line
+ [path to systemd service
directory]), [path_systemdunit=${withval}],
Quoted 1 line
+
[path_systemdunit="$PKG_CONFIG --variable=systemdsystemunitdir systemd"])
configure.ac
Quoted 2 lines
configure.ac +2
-0+if (test -n "${path_systemdunit}"); then +
SYSTEMD_UNITDIR="${path_systemdunit}"
Quoted 2 lines
+
AC_SUBST(SYSTEMD_UNITDIR)
+fi
configure.ac
Quoted 3 lines
configure.ac +2
-0+AM_CONDITIONAL(SYSTEMD, test -n "${path_systemdunit}") +
AC_OUTPUT([
configure.ac
Quoted 2 lines
configure.ac +1
-1-Makefile +Makefile psplash-quit.service
psplash-start.service
Review
Quoted 3 lines
])
configure.ac +1
-0+(quoted diff) +0
-0
b/psplash-quit.service.in
Quoted 2 lines
new file mode 100644
index
0000000..14bd499
Quoted 3 lines
psplash-quit.service.in new file +0
-0@@
-0,0 +1,11 @@
Quoted 3 lines
+[Unit]
+Description=Terminate Psplash Boot Screen
+After=psplash-start.service
psplash-quit.service.in line 6
Quoted 4 lines
psplash-quit.service.in new file +3
-0+ +[Service] +Type=oneshot
+ExecStart=/usr/bin/psplash-write QUIT
psplash-quit.service.in line 9
Quoted 3 lines
psplash-quit.service.in new file +2
-0+TimeoutSec=20 +
+[Install]
Quoted 2 lines
+WantedBy=multi-user.target
diff --git
a/psplash-start.service.in b/psplash-start.service.in
Quoted 1 line
new file mode
100644
Quoted 3 lines
index 0000000..502b150
---/dev/null
+++
b/psplash-start.service.in
psplash-quit.service.in line 1
Quoted 3 lines
psplash-quit.service.in new file +1
-0@@ -0,0 +1,11 @@ +[Unit]
+Description=Starts Psplash Boot screen
Quoted 1 line
+Wants=systemd-vconsole-setup.service
Quoted 1 line
+After=systemd-vconsole-setup.service systemd-udev-trigger.service systemd-udevd.service
psplash-quit.service.in
Quoted 4 lines
psplash-quit.service.in new file +3
-0+DefaultDependencies=no + +[Service]
+ExecStart=/usr/bin/psplash
Quoted 3 lines
+
+[Install]
+WantedBy=sysinit.target
Quoted 2 lines
Signature · 1 line
1.8.4
Hi Petter,
Quoted 5 lines · Petter Mabäcker
Anyone who knows what happened with this change? Any problem detected? I was looking into adding support for systemd in psplash and found this old changeset that is not included in the psplash repo yet.
I dropped the ball on testing it. Last time I looked systemd pretty much assumed that plymouth was being used. If you can verify that this patch set is right, then that's awesome.
Ross
Hi Ross,
Thanks for this info. I will give the patch a spin and let you know about the result.
BR Petter
2015-02-23 14:43 skrev
Burton, Ross:
Quoted 3 lines
Hi Petter,
On 22 February 2015 at 21:20, Petter
Quoted 2 lines · Mabäcker
Quoted 2 lines
Anyone who knows what happened
with this change? Any problem detected? I was looking into adding support for systemd in psplash and found this old changeset that is not included in the psplash repo yet.
Quoted 2 lines
I dropped the ball on testing it.
Last time I looked systemd pretty much assumed that plymouth was being used. If you can verify that this patch set is right, then that's awesome.
Quoted 2 lines
Ross