ryantimwilson / rpms / systemd

Forked from rpms/systemd a month ago
Clone
923a60
From 36bc4ca74d03fcff5808a7efb107886749472819 Mon Sep 17 00:00:00 2001
923a60
From: Mike Gilbert <floppym@gentoo.org>
923a60
Date: Sun, 24 May 2015 16:33:35 -0400
923a60
Subject: [PATCH] shared: generator - correct path to systemd-fsck
923a60
923a60
In generated systemd-fsck-root.service. This would break if rootprefix
923a60
is not /usr/lib/systemd.
923a60
923a60
[tomegun: flesh out commit message]
923a60
923a60
(cherry picked from commit 77eb82f9f0f60535ab5f585834ed6e66cf39b184)
923a60
923a60
Cherry-picked from: 77eb82f
923a60
Resolves: #1222517
923a60
---
923a60
 Makefile.am            | 1 +
923a60
 src/shared/generator.c | 2 +-
923a60
 2 files changed, 2 insertions(+), 1 deletion(-)
923a60
923a60
diff --git a/Makefile.am b/Makefile.am
923a60
index d3fb398fe5..a81d3c131e 100644
923a60
--- a/Makefile.am
923a60
+++ b/Makefile.am
923a60
@@ -177,6 +177,7 @@ AM_CPPFLAGS = \
923a60
 	-DCATALOG_DATABASE=\"$(catalogstatedir)/database\" \
923a60
 	-DSYSTEMD_CGROUP_AGENT_PATH=\"$(rootlibexecdir)/systemd-cgroups-agent\" \
923a60
 	-DSYSTEMD_BINARY_PATH=\"$(rootlibexecdir)/systemd\" \
923a60
+	-DSYSTEMD_FSCK_PATH=\"$(rootlibexecdir)/systemd-fsck\" \
923a60
 	-DSYSTEMD_SHUTDOWN_BINARY_PATH=\"$(rootlibexecdir)/systemd-shutdown\" \
923a60
 	-DSYSTEMD_SLEEP_BINARY_PATH=\"$(rootlibexecdir)/systemd-sleep\" \
923a60
 	-DSYSTEMCTL_BINARY_PATH=\"$(rootbindir)/systemctl\" \
923a60
diff --git a/src/shared/generator.c b/src/shared/generator.c
923a60
index 148a0b077b..3af84a325c 100644
923a60
--- a/src/shared/generator.c
923a60
+++ b/src/shared/generator.c
923a60
@@ -61,7 +61,7 @@ static int write_fsck_sysroot_service(const char *dir, const char *what) {
923a60
                 "[Service]\n"
923a60
                 "Type=oneshot\n"
923a60
                 "RemainAfterExit=yes\n"
923a60
-                "ExecStart=/usr/lib/systemd/systemd-fsck %2$s\n"
923a60
+                "ExecStart=" SYSTEMD_FSCK_PATH " %2$s\n"
923a60
                 "TimeoutSec=0\n",
923a60
                 program_invocation_short_name,
923a60
                 what,