Clean up systemd jobs.
The main visible effect of this is that if console-conf crashes or is killed it restarts instantly rather than 90 seconds later. It also removes the flicker where a getty gets started and then instantly killed during startup.
This commit is contained in:
parent
d3e3e11a18
commit
0e56b0cba0
|
@ -1,3 +1,2 @@
|
|||
[Unit]
|
||||
After=serial-console-conf@%i.service
|
||||
Wants=serial-console-conf@%i.service
|
||||
[Service]
|
||||
ExecStartPre=/bin/systemctl start serial-console-conf@%i.service
|
||||
|
|
|
@ -1,3 +1,2 @@
|
|||
[Unit]
|
||||
After=console-conf@%i.service
|
||||
Wants=console-conf@%i.service
|
||||
[Service]
|
||||
ExecStartPre=/bin/systemctl start console-conf@%i.service
|
||||
|
|
|
@ -1,9 +1,7 @@
|
|||
[Unit]
|
||||
Description=Ubuntu Core Firstboot Configuration %I
|
||||
After=systemd-user-sessions.service plymouth-quit-wait.service
|
||||
ExecPreStart=systemctl stop getty@%I
|
||||
After=rc-local.service
|
||||
ExecStop=systemctl start getty@%I
|
||||
IgnoreOnIsolate=yes
|
||||
ConditionPathExists=/dev/tty0
|
||||
ConditionPathExists=!/var/lib/console-conf/complete
|
||||
|
@ -11,10 +9,8 @@ ConditionPathExists=!/var/lib/console-conf/complete
|
|||
[Service]
|
||||
Environment=PYTHONPATH=/usr/share/subiquity
|
||||
ExecStartPre=/bin/systemctl stop getty@%I
|
||||
ExecStart=-/sbin/agetty -n --noclear -l /usr/share/subiquity/console-conf-wrapper %I $TERM
|
||||
ExecStop=/bin/systemctl start getty@%I
|
||||
#ExecStopPost=/bin/echo "Post stop, starting getty@%I"
|
||||
#ExecStopPost=/bin/systemctl start getty@%I
|
||||
ExecStart=/sbin/agetty -n --noclear -l /usr/share/subiquity/console-conf-wrapper %I $TERM
|
||||
ExecStopPost=/bin/systemctl start getty@%I
|
||||
Type=idle
|
||||
Restart=always
|
||||
RestartSec=0
|
||||
|
|
|
@ -8,8 +8,8 @@ ConditionPathExists=!/var/lib/console-conf/complete
|
|||
[Service]
|
||||
Environment=PYTHONPATH=/usr/share/subiquity
|
||||
ExecStartPre=/bin/systemctl stop serial-getty@%I
|
||||
ExecStart=-/sbin/agetty -n --keep-baud -f /usr/share/subiquity/console-conf-wait -w -l /usr/bin/console-conf --login-options "--serial" 115200,38400,9600 %I $TERM
|
||||
ExecStop=/bin/systemctl start serial-getty@%I
|
||||
ExecStart=/sbin/agetty -n --keep-baud -f /usr/share/subiquity/console-conf-wait -w -l /usr/bin/console-conf --login-options "--serial" 115200,38400,9600 %I $TERM
|
||||
ExecStopPost=/bin/systemctl start serial-getty@%I
|
||||
Type=idle
|
||||
Restart=always
|
||||
RestartSec=0
|
||||
|
|
|
@ -222,5 +222,5 @@ def mark_firstboot_complete():
|
|||
def disable_first_boot_service():
|
||||
""" Stop firstboot service; which also restores getty service """
|
||||
log.info('disabling first boot service')
|
||||
run_command(["systemctl", "stop", "console-conf@*.service", "serial-console-conf@*.service"])
|
||||
run_command(["systemctl", "stop", "--no-block", "console-conf@*.service", "serial-console-conf@*.service"])
|
||||
return
|
||||
|
|
Loading…
Reference in New Issue