[systemd-commits] 3 commits - Makefile.am units/emergency.service.in units/.gitignore units/rescue.service.in units/rescue.service.m4.in

Zbigniew Jędrzejewski-Szmek zbyszek at kemper.freedesktop.org
Sat Aug 30 21:05:21 PDT 2014


 Makefile.am                |    3 +--
 units/.gitignore           |    1 -
 units/emergency.service.in |    3 ++-
 units/rescue.service.in    |   28 ++++++++++++++++++++++++++++
 units/rescue.service.m4.in |   28 ----------------------------
 5 files changed, 31 insertions(+), 32 deletions(-)

New commits:
commit 42377d6bb771c31bff931f83163972fdcb224d0c
Author: Zbigniew Jędrzejewski-Szmek <zbyszek at in.waw.pl>
Date:   Sat Aug 30 22:34:56 2014 -0400

    units: update rescue.service and emergency.service
    
    ^D works in emergency.service too. One needs to log in when in rescue
    mode too.

diff --git a/units/emergency.service.in b/units/emergency.service.in
index 224a434..18973e7 100644
--- a/units/emergency.service.in
+++ b/units/emergency.service.in
@@ -17,7 +17,7 @@ Before=shutdown.target
 Environment=HOME=/root
 WorkingDirectory=/root
 ExecStartPre=-/bin/plymouth quit
-ExecStartPre=-/bin/echo -e 'Welcome to emergency mode! After logging in, type "journalctl -xb" to view\\nsystem logs, "systemctl reboot" to reboot, "systemctl default" to try again\\nto boot into default mode.'
+ExecStartPre=-/bin/echo -e 'Welcome to emergency mode! After logging in, type "journalctl -xb" to view\\nsystem logs, "systemctl reboot" to reboot, "systemctl default" or ^D to\\ntry again to boot into default mode.'
 ExecStart=-/bin/sh -c "/sbin/sulogin; @SYSTEMCTL@ --fail --no-block default"
 Type=idle
 StandardInput=tty-force
diff --git a/units/rescue.service.in b/units/rescue.service.in
index ef54369..fc93f1e 100644
--- a/units/rescue.service.in
+++ b/units/rescue.service.in
@@ -17,7 +17,7 @@ Before=shutdown.target
 Environment=HOME=/root
 WorkingDirectory=/root
 ExecStartPre=-/bin/plymouth quit
-ExecStartPre=-/bin/echo -e 'Welcome to rescue mode! Type "systemctl default" or ^D to enter default mode.\\nType "journalctl -xb" to view system logs. Type "systemctl reboot" to reboot.'
+ExecStartPre=-/bin/echo -e 'Welcome to emergency mode! After logging in, type "journalctl -xb" to view\\nsystem logs, "systemctl reboot" to reboot, "systemctl default" or ^D to\\nboot into default mode.'
 ExecStart=-/bin/sh -c "/sbin/sulogin; @SYSTEMCTL@ --fail --no-block default"
 Type=idle
 StandardInput=tty-force

commit 9c0804278b42261b4dce20ea0ea79bcbad291639
Author: Zbigniew Jędrzejewski-Szmek <zbyszek at in.waw.pl>
Date:   Sat Aug 30 23:59:37 2014 -0400

    units: m4 is not needed for rescue.service

diff --git a/Makefile.am b/Makefile.am
index b37ed41..1991fd0 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -550,7 +550,7 @@ EXTRA_DIST += \
 	units/console-shell.service.m4.in \
 	units/console-getty.service.m4.in \
 	units/container-getty at .service.m4.in \
-	units/rescue.service.m4.in \
+	units/rescue.service.in \
 	units/systemd-initctl.service.in \
 	units/systemd-shutdownd.service.in \
 	units/systemd-remount-fs.service.in \
@@ -585,7 +585,6 @@ CLEANFILES += \
 	units/console-shell.service.m4 \
 	units/console-getty.service.m4 \
 	units/container-getty at .service.m4 \
-	units/rescue.service.m4 \
 	units/user at .service.m4
 
 if HAVE_SYSV_COMPAT
diff --git a/units/.gitignore b/units/.gitignore
index c60f357..ab1d97d 100644
--- a/units/.gitignore
+++ b/units/.gitignore
@@ -16,7 +16,6 @@
 /quotaon.service
 /rc-local.service
 /rescue.service
-/rescue.service.m4
 /serial-getty at .service
 /systemd-ask-password-console.service
 /systemd-ask-password-wall.service
diff --git a/units/rescue.service.in b/units/rescue.service.in
new file mode 100644
index 0000000..ef54369
--- /dev/null
+++ b/units/rescue.service.in
@@ -0,0 +1,28 @@
+#  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=Rescue Shell
+Documentation=man:sulogin(8)
+DefaultDependencies=no
+Conflicts=shutdown.target
+After=sysinit.target plymouth-start.service
+Before=shutdown.target
+
+[Service]
+Environment=HOME=/root
+WorkingDirectory=/root
+ExecStartPre=-/bin/plymouth quit
+ExecStartPre=-/bin/echo -e 'Welcome to rescue mode! Type "systemctl default" or ^D to enter default mode.\\nType "journalctl -xb" to view system logs. Type "systemctl reboot" to reboot.'
+ExecStart=-/bin/sh -c "/sbin/sulogin; @SYSTEMCTL@ --fail --no-block default"
+Type=idle
+StandardInput=tty-force
+StandardOutput=inherit
+StandardError=inherit
+KillMode=process
+IgnoreSIGPIPE=no
+SendSIGHUP=yes
diff --git a/units/rescue.service.m4.in b/units/rescue.service.m4.in
deleted file mode 100644
index ef54369..0000000
--- a/units/rescue.service.m4.in
+++ /dev/null
@@ -1,28 +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=Rescue Shell
-Documentation=man:sulogin(8)
-DefaultDependencies=no
-Conflicts=shutdown.target
-After=sysinit.target plymouth-start.service
-Before=shutdown.target
-
-[Service]
-Environment=HOME=/root
-WorkingDirectory=/root
-ExecStartPre=-/bin/plymouth quit
-ExecStartPre=-/bin/echo -e 'Welcome to rescue mode! Type "systemctl default" or ^D to enter default mode.\\nType "journalctl -xb" to view system logs. Type "systemctl reboot" to reboot.'
-ExecStart=-/bin/sh -c "/sbin/sulogin; @SYSTEMCTL@ --fail --no-block default"
-Type=idle
-StandardInput=tty-force
-StandardOutput=inherit
-StandardError=inherit
-KillMode=process
-IgnoreSIGPIPE=no
-SendSIGHUP=yes

commit 87502e5868a8dbe2fda9a8e66a37ed6996646ef8
Author: Zbigniew Jędrzejewski-Szmek <zbyszek at in.waw.pl>
Date:   Sat Aug 30 22:33:40 2014 -0400

    units: make emergency.service conflict with rescue.service
    
    They both use StandardInput=tty-force so they cannot be run
    concurrently.
    
    https://bugs.freedesktop.org/show_bug.cgi?id=82778
    https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=757072

diff --git a/units/emergency.service.in b/units/emergency.service.in
index 91fc1bb..224a434 100644
--- a/units/emergency.service.in
+++ b/units/emergency.service.in
@@ -10,6 +10,7 @@ Description=Emergency Shell
 Documentation=man:sulogin(8)
 DefaultDependencies=no
 Conflicts=shutdown.target
+Conflicts=rescue.service
 Before=shutdown.target
 
 [Service]



More information about the systemd-commits mailing list