chiark / gitweb /
build-sys: don't hard-code binary paths in initrd-*.service
authorMichael Biebl <biebl@debian.org>
Sat, 9 Mar 2013 08:46:11 +0000 (09:46 +0100)
committerMichael Biebl <biebl@debian.org>
Sat, 9 Mar 2013 09:05:01 +0000 (10:05 +0100)
Instead use @bindir@ for udevadm and @rootbindir@ for systemctl.

Makefile.am
units/initrd-cleanup.service.in [moved from units/initrd-cleanup.service with 87% similarity]
units/initrd-parse-etc.service.in [moved from units/initrd-parse-etc.service with 75% similarity]
units/initrd-switch-root.service.in [moved from units/initrd-switch-root.service with 88% similarity]
units/initrd-udevadm-cleanup-db.service.in [moved from units/initrd-udevadm-cleanup-db.service with 93% similarity]

index 05bf582e267b2286ff644243a7a62b304f659e23..afd259a2e5888a214e6aa43cbf3821adebcdd9cb 100644 (file)
@@ -382,11 +382,7 @@ dist_systemunit_DATA = \
        units/systemd-udevd-control.socket \
        units/systemd-udevd-kernel.socket \
        units/system-update.target \
-       units/initrd-parse-etc.service \
-       units/initrd-cleanup.service \
-       units/initrd-switch-root.target \
-       units/initrd-udevadm-cleanup-db.service \
-       units/initrd-switch-root.service
+       units/initrd-switch-root.target
 
 nodist_systemunit_DATA = \
        units/getty@.service \
@@ -418,7 +414,11 @@ nodist_systemunit_DATA = \
        units/systemd-udevd.service \
        units/systemd-udev-trigger.service \
        units/systemd-udev-settle.service \
-       units/debug-shell.service
+       units/debug-shell.service \
+       units/initrd-parse-etc.service \
+       units/initrd-cleanup.service \
+       units/initrd-udevadm-cleanup-db.service \
+       units/initrd-switch-root.service
 
 dist_userunit_DATA = \
        units/user/default.target \
@@ -460,6 +460,10 @@ EXTRA_DIST += \
        units/systemd-hybrid-sleep.service.in \
        units/systemd-suspend.service.in \
        units/quotaon.service.in \
+       units/initrd-parse-etc.service.in \
+       units/initrd-cleanup.service.in \
+       units/initrd-udevadm-cleanup-db.service.in \
+       units/initrd-switch-root.service.in \
        introspect.awk \
        man/custom-html.xsl
 
similarity index 87%
rename from units/initrd-cleanup.service
rename to units/initrd-cleanup.service.in
index 89986964ea73b64d266a87ee8557a9374e339d67..e926a1eec2e3ef7c1ea580708eb80f8ad8cc24de 100644 (file)
@@ -15,4 +15,4 @@ After=local-fs.target swap.target
 
 [Service]
 Type=oneshot
-ExecStart=/usr/bin/systemctl --no-block isolate initrd-switch-root.target
+ExecStart=@rootbindir@/systemctl --no-block isolate initrd-switch-root.target
similarity index 75%
rename from units/initrd-parse-etc.service
rename to units/initrd-parse-etc.service.in
index 3a71a7ec5681b933989cf00c620b8a3fba4e6ef5..1a2711ac6255af8283a5a25b3ec986ffc887a0ab 100644 (file)
@@ -15,6 +15,6 @@ ConditionPathExists=/etc/initrd-release
 
 [Service]
 Type=oneshot
-ExecStartPre=/usr/bin/systemctl daemon-reload
-ExecStart=/usr/bin/systemctl start local-fs.target
-ExecStart=/usr/bin/systemctl --no-block start initrd-cleanup.service
+ExecStartPre=@rootbindir@/systemctl daemon-reload
+ExecStart=@rootbindir@/systemctl start local-fs.target
+ExecStart=@rootbindir@/systemctl --no-block start initrd-cleanup.service
similarity index 88%
rename from units/initrd-switch-root.service
rename to units/initrd-switch-root.service.in
index e076b391debc8356bbdbb93e3f9f4284583230b2..6740264149f7883c9089a015baf27115154028fc 100644 (file)
@@ -15,5 +15,5 @@ AllowIsolate=yes
 [Service]
 Type=oneshot
 # we have to use "--force" here, otherwise systemd would umount /run
-ExecStart=/usr/bin/systemctl --no-block --force switch-root /sysroot
+ExecStart=@rootbindir@/systemctl --no-block --force switch-root /sysroot
 KillMode=none
similarity index 93%
rename from units/initrd-udevadm-cleanup-db.service
rename to units/initrd-udevadm-cleanup-db.service.in
index 983189e8b08ff2dee79b7e0a3b2ba48b94288a4c..b800c210dbaf1998cafa30574339366c4894c1ee 100644 (file)
@@ -15,4 +15,4 @@ Before=initrd-switch-root.target
 
 [Service]
 Type=oneshot
-ExecStart=-/usr/bin/udevadm info --cleanup-db
+ExecStart=-@bindir@/udevadm info --cleanup-db