]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
systemd: fix emergency.service and rescue.service
authorHarald Hoyer <harald@redhat.com>
Wed, 20 Jun 2012 23:01:51 +0000 (01:01 +0200)
committerHarald Hoyer <harald@redhat.com>
Wed, 20 Jun 2012 23:11:44 +0000 (01:11 +0200)
modules.d/98systemd/emergency.service
modules.d/98systemd/module-setup.sh
modules.d/98systemd/rescue.service

index 86fc13f77c6190818bccc04d4671135e43c40d3c..431e2b019f449fc18509d592d05f3f0a7d4077a6 100644 (file)
 [Unit]
 Description=Emergency Shell
 DefaultDependencies=no
-Conflicts=shutdown.target
-Before=shutdown.target
 
 [Service]
 Environment=HOME=/
 WorkingDirectory=/
+ExecStartPre=-/bin/plymouth quit
+ExecStartPre=-/bin/echo -e '\n\nEntering emergency mode. Exit the shell to continue.\nType "journalctl" to view system logs.\n'
 ExecStart=-/bin/sh -i -l
-ExecStopPost=-/usr/bin/systemctl --fail --no-block default
+ExecStopPost=-/bin/rm -f /.console_lock
 Type=idle
-StandardInput=tty
-StandardOutput=journal+console
+StandardInput=tty-force
+StandardOutput=inherit
 StandardError=inherit
 KillMode=process
 IgnoreSIGPIPE=no
index 2160eb4f21e82df06089b07be5129080f9fd954b..91f50af8d66f6156f94b69724924685f6181d67b 100755 (executable)
@@ -116,7 +116,7 @@ install() {
         dracut_install "$i"
     done
 
-    dracut_install journalctl systemctl
+    dracut_install journalctl systemctl echo
 
     ln -fs $systemdutildir/systemd "$initdir/init"
 
index afd04f7acff721deff505993999b63000aca295b..b5fb6638789c53d51d9eed14670ac7463425c91e 100644 (file)
 [Unit]
 Description=Rescue Shell
 DefaultDependencies=no
-Conflicts=shutdown.target
-After=basic.target plymouth-start.service
-Before=shutdown.target
 
 [Service]
 Environment=HOME=/
 WorkingDirectory=/
+ExecStartPre=-/bin/plymouth quit
 ExecStart=-/bin/sh -i -l
-#ExecStopPost=-/usr/bin/systemctl --fail --no-block switch-root /sysroot /sbin/init
+ExecStopPost=-/bin/rm -f /.console_lock
 ExecStopPost=-/usr/bin/systemctl --fail --no-block default
 Type=idle
-StandardInput=tty
-StandardOutput=journal+console
+StandardInput=tty-force
+StandardOutput=inherit
 StandardError=inherit
 KillMode=process
+IgnoreSIGPIPE=no
 
 # Bash ignores SIGTERM, so we send SIGHUP instead, to ensure that bash
 # terminates cleanly.