[systemd-devel] Adding "After=network-online.target" via drop-in

Andrei Borzenkov arvidjaar at gmail.com
Sun Feb 19 05:35:18 UTC 2017


18.02.2017 23:32, Ian Pilcher пишет:
> I have configured sshd on my firewall to listen only on its internal
> IP address.  This is causing it to fail when it first starts, since the
> IP address is not actually configured yet.
> 
> I have confirmed that adding network-online.target to the After=... line
> in sshd.service file works, but I know that using a drop-in is the
> preferred way of doing this.
> 
> I haven't been able to find clear documentation of whether files in the
> drop-in directory are "incremental" or not.
> 
> I.e., the system sshd.service file contains:
> 
>   After=network.target sshd-keygen.target
> 
> Should my drop-in file contain:
> 
>   After=network.target sshd-keygen.target network-online.target
> 
> Or is this sufficient?
> 
>   After=network-online.target
> 
> Thanks!
> 

In case of After they are additive - each directive adds to the list of
existing ones unless you set 'After=' which removes the while list.


More information about the systemd-devel mailing list