anitazha / rpms / systemd

Forked from rpms/systemd 3 years ago
Clone

Blame SOURCES/0217-shared-generator-correct-path-to-systemd-fsck.patch

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