[systemd-devel] How to control the login prompt from my application service unit file?

Moji, Shashidhar Shashidhar.Moji at dellteam.com
Tue Oct 15 04:15:52 UTC 2019


Hi,
We have VMware vApp based solution. Our application gets installed during first boot.
Till now we had SLES11 OS based VM and we upgraded to SLES12. Now we have systemd instead of init scripts for service handling.
In SLES11, we had service dependency configured in init scripts that was holding back the login prompt until our application installation is done. But in SLES12, we get the login prompt before our application is installed.

How to hold the login prompt until our application installation is complete? We tried adding Before=getty at .service  in our application install unit file, but its not helping.

~~~~~~~~~~~~~~~~~
[Unit]
Description=ADG runonce apg_install
DefaultDependencies=no
After=local-fs.target network-online.target
Before=getty at .service
Wants=network-online.target
Wants=network-onine.target

[Service]
Type=forking
ExecStartPre=/bin/touch /etc/no-login-console
ExecStart=/bin/sh -c "/opt/ADG/runonce/scripts/apg_install"
ExecStartPost=/opt/ADG/runonce/bin/runonce removeflag apg_install
ExecStartPost=/bin/rm /etc/no-login-console
KillMode=process
Restart=no

[Install]
WantedBy=multi-user.target
~~~~~~~~~~~~~~~~~~~~
Thanks,
Shashi


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20191015/7ac7ea5f/attachment-0001.html>


More information about the systemd-devel mailing list