[systemd-commits] Makefile.am units/initrd-cleanup.service units/initrd-cleanup.service.in units/initrd-parse-etc.service units/initrd-parse-etc.service.in units/initrd-switch-root.service units/initrd-switch-root.service.in units/initrd-udevadm-cleanup-db.service units/initrd-udevadm-cleanup-db.service.in

Michael Biebl mbiebl at kemper.freedesktop.org
Sat Mar 9 01:05:21 PST 2013


 Makefile.am                                |   16 ++++++++++------
 units/initrd-cleanup.service               |   18 ------------------
 units/initrd-cleanup.service.in            |   18 ++++++++++++++++++
 units/initrd-parse-etc.service             |   20 --------------------
 units/initrd-parse-etc.service.in          |   20 ++++++++++++++++++++
 units/initrd-switch-root.service           |   19 -------------------
 units/initrd-switch-root.service.in        |   19 +++++++++++++++++++
 units/initrd-udevadm-cleanup-db.service    |   18 ------------------
 units/initrd-udevadm-cleanup-db.service.in |   18 ++++++++++++++++++
 9 files changed, 85 insertions(+), 81 deletions(-)

New commits:
commit 7b40ce553f0ec9487077e53f5bdc46580025901c
Author: Michael Biebl <biebl at debian.org>
Date:   Sat Mar 9 09:46:11 2013 +0100

    build-sys: don't hard-code binary paths in initrd-*.service
    
    Instead use @bindir@ for udevadm and @rootbindir@ for systemctl.

diff --git a/Makefile.am b/Makefile.am
index 05bf582..afd259a 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -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 at .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
 
diff --git a/units/initrd-cleanup.service b/units/initrd-cleanup.service
deleted file mode 100644
index 8998696..0000000
--- a/units/initrd-cleanup.service
+++ /dev/null
@@ -1,18 +0,0 @@
-#  This file is part of systemd.
-#
-#  systemd is free software; you can redistribute it and/or modify it
-#  under the terms of the GNU Lesser General Public License as published by
-#  the Free Software Foundation; either version 2.1 of the License, or
-#  (at your option) any later version.
-
-[Unit]
-Description=Cleaning Up and Shutting Down Daemons
-DefaultDependencies=no
-ConditionPathExists=/etc/initrd-release
-OnFailure=emergency.target
-Requires=local-fs.target swap.target
-After=local-fs.target swap.target
-
-[Service]
-Type=oneshot
-ExecStart=/usr/bin/systemctl --no-block isolate initrd-switch-root.target
diff --git a/units/initrd-cleanup.service.in b/units/initrd-cleanup.service.in
new file mode 100644
index 0000000..e926a1e
--- /dev/null
+++ b/units/initrd-cleanup.service.in
@@ -0,0 +1,18 @@
+#  This file is part of systemd.
+#
+#  systemd is free software; you can redistribute it and/or modify it
+#  under the terms of the GNU Lesser General Public License as published by
+#  the Free Software Foundation; either version 2.1 of the License, or
+#  (at your option) any later version.
+
+[Unit]
+Description=Cleaning Up and Shutting Down Daemons
+DefaultDependencies=no
+ConditionPathExists=/etc/initrd-release
+OnFailure=emergency.target
+Requires=local-fs.target swap.target
+After=local-fs.target swap.target
+
+[Service]
+Type=oneshot
+ExecStart=@rootbindir@/systemctl --no-block isolate initrd-switch-root.target
diff --git a/units/initrd-parse-etc.service b/units/initrd-parse-etc.service
deleted file mode 100644
index 3a71a7e..0000000
--- a/units/initrd-parse-etc.service
+++ /dev/null
@@ -1,20 +0,0 @@
-#  This file is part of systemd.
-#
-#  systemd is free software; you can redistribute it and/or modify it
-#  under the terms of the GNU Lesser General Public License as published by
-#  the Free Software Foundation; either version 2.1 of the License, or
-#  (at your option) any later version.
-
-[Unit]
-Description=Reload Configuration from the Real Root
-DefaultDependencies=no
-Requires=local-fs.target swap.target
-After=local-fs.target swap.target
-OnFailure=emergency.target
-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
diff --git a/units/initrd-parse-etc.service.in b/units/initrd-parse-etc.service.in
new file mode 100644
index 0000000..1a2711a
--- /dev/null
+++ b/units/initrd-parse-etc.service.in
@@ -0,0 +1,20 @@
+#  This file is part of systemd.
+#
+#  systemd is free software; you can redistribute it and/or modify it
+#  under the terms of the GNU Lesser General Public License as published by
+#  the Free Software Foundation; either version 2.1 of the License, or
+#  (at your option) any later version.
+
+[Unit]
+Description=Reload Configuration from the Real Root
+DefaultDependencies=no
+Requires=local-fs.target swap.target
+After=local-fs.target swap.target
+OnFailure=emergency.target
+ConditionPathExists=/etc/initrd-release
+
+[Service]
+Type=oneshot
+ExecStartPre=@rootbindir@/systemctl daemon-reload
+ExecStart=@rootbindir@/systemctl start local-fs.target
+ExecStart=@rootbindir@/systemctl --no-block start initrd-cleanup.service
diff --git a/units/initrd-switch-root.service b/units/initrd-switch-root.service
deleted file mode 100644
index e076b39..0000000
--- a/units/initrd-switch-root.service
+++ /dev/null
@@ -1,19 +0,0 @@
-#  This file is part of systemd.
-#
-#  systemd is free software; you can redistribute it and/or modify it
-#  under the terms of the GNU Lesser General Public License as published by
-#  the Free Software Foundation; either version 2.1 of the License, or
-#  (at your option) any later version.
-
-[Unit]
-Description=Switch Root
-DefaultDependencies=no
-ConditionPathExists=/etc/initrd-release
-OnFailure=emergency.target
-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
-KillMode=none
diff --git a/units/initrd-switch-root.service.in b/units/initrd-switch-root.service.in
new file mode 100644
index 0000000..6740264
--- /dev/null
+++ b/units/initrd-switch-root.service.in
@@ -0,0 +1,19 @@
+#  This file is part of systemd.
+#
+#  systemd is free software; you can redistribute it and/or modify it
+#  under the terms of the GNU Lesser General Public License as published by
+#  the Free Software Foundation; either version 2.1 of the License, or
+#  (at your option) any later version.
+
+[Unit]
+Description=Switch Root
+DefaultDependencies=no
+ConditionPathExists=/etc/initrd-release
+OnFailure=emergency.target
+AllowIsolate=yes
+
+[Service]
+Type=oneshot
+# we have to use "--force" here, otherwise systemd would umount /run
+ExecStart=@rootbindir@/systemctl --no-block --force switch-root /sysroot
+KillMode=none
diff --git a/units/initrd-udevadm-cleanup-db.service b/units/initrd-udevadm-cleanup-db.service
deleted file mode 100644
index 983189e..0000000
--- a/units/initrd-udevadm-cleanup-db.service
+++ /dev/null
@@ -1,18 +0,0 @@
-#  This file is part of systemd.
-#
-#  systemd is free software; you can redistribute it and/or modify it
-#  under the terms of the GNU Lesser General Public License as published by
-#  the Free Software Foundation; either version 2.1 of the License, or
-#  (at your option) any later version.
-
-[Unit]
-Description=Cleanup udevd DB
-DefaultDependencies=no
-ConditionPathExists=/etc/initrd-release
-Conflicts=systemd-udevd.service systemd-udevd-control.socket systemd-udevd-kernel.socket
-After=systemd-udevd.service systemd-udevd-control.socket systemd-udevd-kernel.socket
-Before=initrd-switch-root.target
-
-[Service]
-Type=oneshot
-ExecStart=-/usr/bin/udevadm info --cleanup-db
diff --git a/units/initrd-udevadm-cleanup-db.service.in b/units/initrd-udevadm-cleanup-db.service.in
new file mode 100644
index 0000000..b800c21
--- /dev/null
+++ b/units/initrd-udevadm-cleanup-db.service.in
@@ -0,0 +1,18 @@
+#  This file is part of systemd.
+#
+#  systemd is free software; you can redistribute it and/or modify it
+#  under the terms of the GNU Lesser General Public License as published by
+#  the Free Software Foundation; either version 2.1 of the License, or
+#  (at your option) any later version.
+
+[Unit]
+Description=Cleanup udevd DB
+DefaultDependencies=no
+ConditionPathExists=/etc/initrd-release
+Conflicts=systemd-udevd.service systemd-udevd-control.socket systemd-udevd-kernel.socket
+After=systemd-udevd.service systemd-udevd-control.socket systemd-udevd-kernel.socket
+Before=initrd-switch-root.target
+
+[Service]
+Type=oneshot
+ExecStart=- at bindir@/udevadm info --cleanup-db



More information about the systemd-commits mailing list