chiark / gitweb /
units/: use @SYSTEMCTL@ instead of hardcoded paths
authorDave Reisner <dreisner@archlinux.org>
Wed, 4 Apr 2012 04:22:21 +0000 (00:22 -0400)
committerKay Sievers <kay.sievers@vrfy.org>
Wed, 4 Apr 2012 04:46:35 +0000 (06:46 +0200)
Especially in the case of --enable-split-usr, several units will point
to the wrong location for systemctl. Use @SYSTEMCTL@ which will always
contain the proper path.

Makefile.am
units/.gitignore
units/console-shell.service.m4.in [moved from units/console-shell.service.m4 with 96% similarity]
units/emergency.service.in [moved from units/emergency.service with 94% similarity]
units/rescue.service.m4.in [moved from units/rescue.service.m4 with 95% similarity]
units/systemd-ask-password-wall.service.in

index 2b04142ea7e9ec2a0261ef87d82cb43c0e2bc533..3cb50d854cc44f4027b299ae71e9b1eee8d602af 100644 (file)
@@ -338,6 +338,7 @@ nodist_systemunit_DATA = \
        units/systemd-ask-password-console.service \
        units/systemd-sysctl.service \
        units/halt.service \
+       units/emergency.service \
        units/poweroff.service \
        units/reboot.service \
        units/kexec.service \
@@ -359,8 +360,8 @@ nodist_userunit_DATA = \
 EXTRA_DIST += \
        units/getty@.service.m4 \
        units/serial-getty@.service.m4 \
-       units/console-shell.service.m4 \
-       units/rescue.service.m4 \
+       units/console-shell.service.m4.in \
+       units/rescue.service.m4.in \
        units/systemd-initctl.service.in \
        units/systemd-shutdownd.service.in \
        units/systemd-modules-load.service.in \
@@ -372,6 +373,7 @@ EXTRA_DIST += \
        units/systemd-ask-password-wall.service.in \
        units/systemd-ask-password-console.service.in \
        units/systemd-sysctl.service.in \
+       units/emergency.service.in \
        units/halt.service.in \
        units/poweroff.service.in \
        units/reboot.service.in \
index f3b3cef133b7f49d17e22afe48105695abc39b38..3cf64237a8a47d115ecf42e9e9b44150d4b83cc7 100644 (file)
@@ -40,6 +40,7 @@ systemd-update-utmp-runlevel.service
 systemd-update-utmp-shutdown.service
 test-env-replace
 systemd-binfmt.service
+emergency.service
 /udev-settle.service
 /udev-trigger.service
 /udev.service
similarity index 96%
rename from units/console-shell.service.m4
rename to units/console-shell.service.m4.in
index fef9e1b176265c9d7cca18ff406a836b6ea7b994..b0ced10aaa1dd8012195e3fe59a15296ca6a28af 100644 (file)
@@ -32,7 +32,7 @@ Before=getty.target
 Environment=HOME=/root
 WorkingDirectory=/root
 ExecStart=-/sbin/sulogin
-ExecStopPost=-/bin/systemctl poweroff
+ExecStopPost=-@SYSTEMCTL@ poweroff
 StandardInput=tty-force
 StandardOutput=inherit
 StandardError=inherit
similarity index 94%
rename from units/emergency.service
rename to units/emergency.service.in
index 43a74d7a3685f3554fa6d0f45b4a9cc98799a1e7..11ff472f6e7588fad12c924802ed63337b00c7cb 100644 (file)
@@ -19,7 +19,7 @@ WorkingDirectory=/root
 ExecStartPre=-/bin/plymouth quit
 ExecStartPre=-/bin/echo 'Welcome to emergency mode. Use "systemctl default" or ^D to enter default mode.'
 ExecStart=-/sbin/sulogin
-ExecStopPost=/bin/systemctl --fail --no-block default
+ExecStopPost=@SYSTEMCTL@ --fail --no-block default
 StandardInput=tty-force
 StandardOutput=inherit
 StandardError=inherit
similarity index 95%
rename from units/rescue.service.m4
rename to units/rescue.service.m4.in
index 310bbce1e67773f3639b1d7d881f56ea2f127a79..df0b54fd608b4bdb1a7705d1ff24388a5cdd0372 100644 (file)
@@ -32,7 +32,7 @@ m4_ifdef(`TARGET_MEEGO',
 `EnvironmentFile=/etc/sysconfig/init
 ExecStart=-/bin/bash -c "exec ${SINGLE}"',
 `ExecStart=-/sbin/sulogin'))))
-ExecStopPost=-/bin/systemctl --fail --no-block default
+ExecStopPost=-@SYSTEMCTL@ --fail --no-block default
 StandardInput=tty-force
 StandardOutput=inherit
 StandardError=inherit
index 71ec1d68f85fd9696af6ff17e2dadaf8c77e6d20..d8e27bf96bcbd322c4d5769f2e8ddd646b0daa52 100644 (file)
@@ -10,6 +10,6 @@ Description=Forward Password Requests to Wall
 After=systemd-user-sessions.service
 
 [Service]
-ExecStartPre=-@rootbindir@/systemctl stop systemd-ask-password-console.path systemd-ask-password-console.service
-ExecStartPre=-@rootbindir@/systemctl stop systemd-ask-password-plymouth.path systemd-ask-password-plymouth.service
+ExecStartPre=-@SYSTEMCTL@ stop systemd-ask-password-console.path systemd-ask-password-console.service
+ExecStartPre=-@SYSTEMCTL@ stop systemd-ask-password-plymouth.path systemd-ask-password-plymouth.service
 ExecStart=@rootbindir@/systemd-tty-ask-password-agent --wall