I need to start and print a script on tty1 instead of asking for login. In link with : How to parse /proc/cmdline before asking tty login with systemd
I tried to make a service which launch a simple bash script:
#!/bin/bash echo "trying to print this on screen before tty login" read ok
And the service:
[Unit] Description=Before tty login script launcher [Service] Type=simple ExecStart=/bin/bash -c "/opt/starter.sh" [Install] WantedBy=getty.target
cd /lib/systemd/system ; ln -s ./starter.service ./getty.target.wants/starter.service
At boot, it keep launching tty login without prompting my script. I don't want to start script after login cause, script needs root privileges, so if somebody CTRL+C, he will have root access.