Re: Network services start before network is up since migrating to 7.2

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



> If you're using NetworkManager, you can "systemctl enable
> NetworkManager-wait-online.service" and you won't have to override any
> of the individual services.
Our security experts don't want me to use NetworkManager... It's even uninstalled on the models, so I understand better why all the required files are not here :

# systemctl status NetworkManager-wait-online.service
● NetworkManager-wait-online.service
   Loaded: not-found (Reason: No such file or directory)
   Active: inactive (dead)

So I made a crappy but easy-to-deploy script to make the services start after network is online :

for fic in $(grep -rl "After=.*network.target" /lib/systemd/system | cut -d/ -f5 | grep -v "network-online.target")
do
   [ ! -d "/etc/systemd/system/${fic}.d" ] && mkdir -v "/etc/systemd/system/${fic}.d"
   echo -e "[Unit]\nAfter=network-online.target" > "/etc/systemd/system/${fic}.d/local-network-online.conf" && echo "/etc/systemd/system/${fic}.d/local-network-online.conf"
done
systemctl daemon-reload

That's working as is, so I'll keep this workaround for now.

Sylvain.
Pensez ENVIRONNEMENT : n'imprimer que si ncessaire

_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
https://lists.centos.org/mailman/listinfo/centos




[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux