Re: How to control the login prompt from my application service unit file?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Di, 15.10.19 04:15, Moji, Shashidhar (Shashidhar.Moji@xxxxxxxxxxxx) wrote:

> 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@.service  in our application
> install unit file, but its not helping.

getty@.service is just a template for a unit, not a unit itself. Thus
you cannot have a dependency on it as a whole.

You have two options:

1. You can add a dropin getty@.service.d/foobar.conf, i.e. extend the
   getty@.service file that all VT gettys are instantiated of. In
   there, just place:

   [Unit]
   After=…

2. Order your unit before systemd-user-sessions.service. All gettys
   and other logins order themselves after that service, so if you order
   yourse before it you get the behaviour you are looking for.

The first option is nicer, since it's more specific to a getty type,
while the latter appplies to all logins including SSH or graphical.

Lennart

--
Lennart Poettering, Berlin
_______________________________________________
systemd-devel mailing list
systemd-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/systemd-devel




[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux