On 07/09/2021 02.34, Carlos E. R. wrote:
El 2021-08-28 a las 20:59 +0300, Andrei Borzenkov escribió:
On Sat, Aug 28, 2021 at 4:52 PM Carlos E. R. <> wrote:
Hi,
In this leap 15.2 laptop postfix fails to start atuomatically during boot, because network, handled by network manager, has not started yet:
...
2. You could add After=network-online.target to your unit and enable NetworkManager-wait-online.service. This waits until nm-online reports "online" up to timeout (I think 30 seconds by default). It may be too strong (error message just complaints about missing local interface with fixed address, not about not being "online").
This one, yes. That's the one I need, and not only on postfix.
It worked :-) minas-tirith:~ # systemctl cat postfix.service # /usr/lib/systemd/system/postfix.service # This file is part of package postfix. ... [Install] WantedBy=multi-user.target # /etc/systemd/system/postfix.service.d/override.conf [Unit] After=network-online.target minas-tirith:~ # I did the same change for dnsmasq and ntpd. Might add others some day. nfs perhaps.
Huh, something else I noticed, dunno is related:
minas-tirith:~ # l /etc/systemd/system/multi-user.target.wants/network.service lrwxrwxrwx 1 root root 39 Jan 6 2014 /etc/systemd/system/multi-user.target.wants/network.service -> /usr/lib/systemd/system/network.service minas-tirith:~ #
The link is broken.
minas-tirith:/etc/systemd/system/multi-user.target.wants # l /usr/lib/systemd/system/network.service ls: cannot access '/usr/lib/systemd/system/network.service': No such file or directory minas-tirith:/etc/systemd/system/multi-user.target.wants # locate network.service /etc/systemd/system/network.service /etc/systemd/system/graphical.target.wants/network.service /etc/systemd/system/multi-user.target.wants/network.service /other/etc/systemd/system/network.service minas-tirith:/etc/systemd/system/multi-user.target.wants #
minas-tirith:~ # l /etc/systemd/system/network.service lrwxrwxrwx 1 root root 46 Jan 6 2014 /etc/systemd/system/network.service -> usr/lib/systemd/system/NetworkManager.service minas-tirith:~ # l /usr/lib/systemd/system/NetworkManager.service -rw-r--r-- 1 root root 1175 Apr 23 14:20 /usr/lib/systemd/system/NetworkManager.service minas-tirith:~ #
I have manually changed symlink /etc/systemd/system/multi-user.target.wants/network.service to point to /etc/systemd/system/network.service, which in turn points to /usr/lib/systemd/system/NetworkManager.service. Will try reboot later. -- Cheers / Saludos, Carlos E. R. (from oS Leap 15.2 x86_64 (Minas Tirith))