agama/live/live-root/etc/systemd/system/checkmedia.service

46 lines
1.1 KiB
Desktop File

[Unit]
Description=Installation medium integrity check
# before X11 because it switches the terminal to VT7
Before=agama.service
# copied from YaST2-Second-Stage.service
Before=getty@tty1.service
Before=getty@tty2.service
Before=getty@tty3.service
Before=getty@tty4.service
Before=getty@tty5.service
Before=getty@tty6.service
Before=serial-getty@hvc0.service
Before=serial-getty@sclp_line0.service
Before=serial-getty@ttyAMA0.service
Before=serial-getty@ttyS0.service
Before=serial-getty@ttyS1.service
Before=serial-getty@ttyS2.service
Before=serial-getty@ttysclp0.service
# kernel command line option
ConditionKernelCommandLine=mediacheck=1
[Service]
Type=oneshot
Environment=TERM=linux
# disable the kernel output on the console
ExecStartPre=dmesg --console-off
# disable the systemd status messages on the console
ExecStartPre=kill -SIGRTMIN+21 1
ExecStart=checkmedia-service
# enable back the kernel output on the console
ExecStartPost=dmesg --console-on
# enable back the systemd status messages on the console
ExecStartPost=kill -SIGRTMIN+20 1
StandardOutput=tty
RemainAfterExit=true
TimeoutStartSec=infinity
[Install]
WantedBy=multi-user.target