systemd: fix emergency.service and rescue.service

master
Harald Hoyer 2012-06-21 01:01:51 +02:00
parent 529f7bf358
commit b47e023767
3 changed files with 11 additions and 12 deletions

View File

@ -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

View File

@ -116,7 +116,7 @@ install() {
dracut_install "$i"
done

dracut_install journalctl systemctl
dracut_install journalctl systemctl echo

ln -fs $systemdutildir/systemd "$initdir/init"


View File

@ -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.