teknoraver / rpms / systemd

Forked from rpms/systemd 2 months ago
Clone

Blame 0013-build-sys-don-t-hard-code-binary-paths-in-initrd-.se.patch

Harald Hoyer 2e2e24
From 7b40ce553f0ec9487077e53f5bdc46580025901c Mon Sep 17 00:00:00 2001
Harald Hoyer 2e2e24
From: Michael Biebl <biebl@debian.org>
Harald Hoyer 2e2e24
Date: Sat, 9 Mar 2013 09:46:11 +0100
Harald Hoyer 2e2e24
Subject: [PATCH] build-sys: don't hard-code binary paths in initrd-*.service
Harald Hoyer 2e2e24
Harald Hoyer 2e2e24
Instead use @bindir@ for udevadm and @rootbindir@ for systemctl.
Harald Hoyer 2e2e24
---
Harald Hoyer 2e2e24
 Makefile.am                                              | 16 ++++++++++------
Harald Hoyer 2e2e24
 ...{initrd-cleanup.service => initrd-cleanup.service.in} |  2 +-
Harald Hoyer 2e2e24
 ...trd-parse-etc.service => initrd-parse-etc.service.in} |  6 +++---
Harald Hoyer 2e2e24
 ...switch-root.service => initrd-switch-root.service.in} |  2 +-
Harald Hoyer 2e2e24
 ...p-db.service => initrd-udevadm-cleanup-db.service.in} |  2 +-
Harald Hoyer 2e2e24
 5 files changed, 16 insertions(+), 12 deletions(-)
Harald Hoyer 2e2e24
 rename units/{initrd-cleanup.service => initrd-cleanup.service.in} (87%)
Harald Hoyer 2e2e24
 rename units/{initrd-parse-etc.service => initrd-parse-etc.service.in} (75%)
Harald Hoyer 2e2e24
 rename units/{initrd-switch-root.service => initrd-switch-root.service.in} (88%)
Harald Hoyer 2e2e24
 rename units/{initrd-udevadm-cleanup-db.service => initrd-udevadm-cleanup-db.service.in} (93%)
Harald Hoyer 2e2e24
Harald Hoyer 2e2e24
diff --git a/Makefile.am b/Makefile.am
Harald Hoyer 2e2e24
index 05bf582..afd259a 100644
Harald Hoyer 2e2e24
--- a/Makefile.am
Harald Hoyer 2e2e24
+++ b/Makefile.am
Harald Hoyer 2e2e24
@@ -382,11 +382,7 @@ dist_systemunit_DATA = \
Harald Hoyer 2e2e24
 	units/systemd-udevd-control.socket \
Harald Hoyer 2e2e24
 	units/systemd-udevd-kernel.socket \
Harald Hoyer 2e2e24
 	units/system-update.target \
Harald Hoyer 2e2e24
-	units/initrd-parse-etc.service \
Harald Hoyer 2e2e24
-	units/initrd-cleanup.service \
Harald Hoyer 2e2e24
-	units/initrd-switch-root.target \
Harald Hoyer 2e2e24
-	units/initrd-udevadm-cleanup-db.service \
Harald Hoyer 2e2e24
-	units/initrd-switch-root.service
Harald Hoyer 2e2e24
+	units/initrd-switch-root.target
Harald Hoyer 2e2e24
 
Harald Hoyer 2e2e24
 nodist_systemunit_DATA = \
Harald Hoyer 2e2e24
 	units/getty@.service \
Harald Hoyer 2e2e24
@@ -418,7 +414,11 @@ nodist_systemunit_DATA = \
Harald Hoyer 2e2e24
 	units/systemd-udevd.service \
Harald Hoyer 2e2e24
 	units/systemd-udev-trigger.service \
Harald Hoyer 2e2e24
 	units/systemd-udev-settle.service \
Harald Hoyer 2e2e24
-	units/debug-shell.service
Harald Hoyer 2e2e24
+	units/debug-shell.service \
Harald Hoyer 2e2e24
+	units/initrd-parse-etc.service \
Harald Hoyer 2e2e24
+	units/initrd-cleanup.service \
Harald Hoyer 2e2e24
+	units/initrd-udevadm-cleanup-db.service \
Harald Hoyer 2e2e24
+	units/initrd-switch-root.service
Harald Hoyer 2e2e24
 
Harald Hoyer 2e2e24
 dist_userunit_DATA = \
Harald Hoyer 2e2e24
 	units/user/default.target \
Harald Hoyer 2e2e24
@@ -460,6 +460,10 @@ EXTRA_DIST += \
Harald Hoyer 2e2e24
 	units/systemd-hybrid-sleep.service.in \
Harald Hoyer 2e2e24
 	units/systemd-suspend.service.in \
Harald Hoyer 2e2e24
 	units/quotaon.service.in \
Harald Hoyer 2e2e24
+	units/initrd-parse-etc.service.in \
Harald Hoyer 2e2e24
+	units/initrd-cleanup.service.in \
Harald Hoyer 2e2e24
+	units/initrd-udevadm-cleanup-db.service.in \
Harald Hoyer 2e2e24
+	units/initrd-switch-root.service.in \
Harald Hoyer 2e2e24
 	introspect.awk \
Harald Hoyer 2e2e24
 	man/custom-html.xsl
Harald Hoyer 2e2e24
 
Harald Hoyer 2e2e24
diff --git a/units/initrd-cleanup.service b/units/initrd-cleanup.service.in
Harald Hoyer 2e2e24
similarity index 87%
Harald Hoyer 2e2e24
rename from units/initrd-cleanup.service
Harald Hoyer 2e2e24
rename to units/initrd-cleanup.service.in
Harald Hoyer 2e2e24
index 8998696..e926a1e 100644
Harald Hoyer 2e2e24
--- a/units/initrd-cleanup.service
Harald Hoyer 2e2e24
+++ b/units/initrd-cleanup.service.in
Harald Hoyer 2e2e24
@@ -15,4 +15,4 @@ After=local-fs.target swap.target
Harald Hoyer 2e2e24
 
Harald Hoyer 2e2e24
 [Service]
Harald Hoyer 2e2e24
 Type=oneshot
Harald Hoyer 2e2e24
-ExecStart=/usr/bin/systemctl --no-block isolate initrd-switch-root.target
Harald Hoyer 2e2e24
+ExecStart=@rootbindir@/systemctl --no-block isolate initrd-switch-root.target
Harald Hoyer 2e2e24
diff --git a/units/initrd-parse-etc.service b/units/initrd-parse-etc.service.in
Harald Hoyer 2e2e24
similarity index 75%
Harald Hoyer 2e2e24
rename from units/initrd-parse-etc.service
Harald Hoyer 2e2e24
rename to units/initrd-parse-etc.service.in
Harald Hoyer 2e2e24
index 3a71a7e..1a2711a 100644
Harald Hoyer 2e2e24
--- a/units/initrd-parse-etc.service
Harald Hoyer 2e2e24
+++ b/units/initrd-parse-etc.service.in
Harald Hoyer 2e2e24
@@ -15,6 +15,6 @@ ConditionPathExists=/etc/initrd-release
Harald Hoyer 2e2e24
 
Harald Hoyer 2e2e24
 [Service]
Harald Hoyer 2e2e24
 Type=oneshot
Harald Hoyer 2e2e24
-ExecStartPre=/usr/bin/systemctl daemon-reload
Harald Hoyer 2e2e24
-ExecStart=/usr/bin/systemctl start local-fs.target
Harald Hoyer 2e2e24
-ExecStart=/usr/bin/systemctl --no-block start initrd-cleanup.service
Harald Hoyer 2e2e24
+ExecStartPre=@rootbindir@/systemctl daemon-reload
Harald Hoyer 2e2e24
+ExecStart=@rootbindir@/systemctl start local-fs.target
Harald Hoyer 2e2e24
+ExecStart=@rootbindir@/systemctl --no-block start initrd-cleanup.service
Harald Hoyer 2e2e24
diff --git a/units/initrd-switch-root.service b/units/initrd-switch-root.service.in
Harald Hoyer 2e2e24
similarity index 88%
Harald Hoyer 2e2e24
rename from units/initrd-switch-root.service
Harald Hoyer 2e2e24
rename to units/initrd-switch-root.service.in
Harald Hoyer 2e2e24
index e076b39..6740264 100644
Harald Hoyer 2e2e24
--- a/units/initrd-switch-root.service
Harald Hoyer 2e2e24
+++ b/units/initrd-switch-root.service.in
Harald Hoyer 2e2e24
@@ -15,5 +15,5 @@ AllowIsolate=yes
Harald Hoyer 2e2e24
 [Service]
Harald Hoyer 2e2e24
 Type=oneshot
Harald Hoyer 2e2e24
 # we have to use "--force" here, otherwise systemd would umount /run
Harald Hoyer 2e2e24
-ExecStart=/usr/bin/systemctl --no-block --force switch-root /sysroot
Harald Hoyer 2e2e24
+ExecStart=@rootbindir@/systemctl --no-block --force switch-root /sysroot
Harald Hoyer 2e2e24
 KillMode=none
Harald Hoyer 2e2e24
diff --git a/units/initrd-udevadm-cleanup-db.service b/units/initrd-udevadm-cleanup-db.service.in
Harald Hoyer 2e2e24
similarity index 93%
Harald Hoyer 2e2e24
rename from units/initrd-udevadm-cleanup-db.service
Harald Hoyer 2e2e24
rename to units/initrd-udevadm-cleanup-db.service.in
Harald Hoyer 2e2e24
index 983189e..b800c21 100644
Harald Hoyer 2e2e24
--- a/units/initrd-udevadm-cleanup-db.service
Harald Hoyer 2e2e24
+++ b/units/initrd-udevadm-cleanup-db.service.in
Harald Hoyer 2e2e24
@@ -15,4 +15,4 @@ Before=initrd-switch-root.target
Harald Hoyer 2e2e24
 
Harald Hoyer 2e2e24
 [Service]
Harald Hoyer 2e2e24
 Type=oneshot
Harald Hoyer 2e2e24
-ExecStart=-/usr/bin/udevadm info --cleanup-db
Harald Hoyer 2e2e24
+ExecStart=-@bindir@/udevadm info --cleanup-db
Harald Hoyer 2e2e24
-- 
Harald Hoyer 2e2e24
1.8.1
Harald Hoyer 2e2e24