From: Harald Hoyer Date: Wed, 20 Jun 2012 23:01:51 +0000 (+0200) Subject: systemd: fix emergency.service and rescue.service X-Git-Tag: 020~72 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b47e023767ae6c8dad816d44b3ffd8dcd5048afe;p=thirdparty%2Fdracut.git systemd: fix emergency.service and rescue.service --- diff --git a/modules.d/98systemd/emergency.service b/modules.d/98systemd/emergency.service index 86fc13f77..431e2b019 100644 --- a/modules.d/98systemd/emergency.service +++ b/modules.d/98systemd/emergency.service @@ -10,17 +10,17 @@ [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 diff --git a/modules.d/98systemd/module-setup.sh b/modules.d/98systemd/module-setup.sh index 2160eb4f2..91f50af8d 100755 --- a/modules.d/98systemd/module-setup.sh +++ b/modules.d/98systemd/module-setup.sh @@ -116,7 +116,7 @@ install() { dracut_install "$i" done - dracut_install journalctl systemctl + dracut_install journalctl systemctl echo ln -fs $systemdutildir/systemd "$initdir/init" diff --git a/modules.d/98systemd/rescue.service b/modules.d/98systemd/rescue.service index afd04f7ac..b5fb66387 100644 --- a/modules.d/98systemd/rescue.service +++ b/modules.d/98systemd/rescue.service @@ -10,21 +10,20 @@ [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.