Bug: RedHat/Fedora based systems long boot time. Systemd valet-dns.service network wait online issue.
Basic info
| Distro (Name and version) | PHP Version | Valet version |
|---|---|---|
| Ex: Fedora 38 | 8.2.10 | 2.3.5 |
What is the problem?
On Fedora systems dns-valet.service waits until network is onlina via /usr/lib/systemd/systemd-networkd-wait-online
Wants=network-online.target systemd-networkd-wait-online.service
This results into long system boot times because /usr/lib/systemd/systemd-networkd-wait-online is not responding properly and I guess is somewhat deprecated on Fedora.
For network online presence Fedora uses NetworkManager-wait-online.service by accordingly calling ExecStart=/usr/bin/nm-online -s -q which is already a part of network-online.target.
Second systemd-networkd-wait-online.service parameter should be removed for Fedora systems.
Solution
For Fedora systems systemd valet-dns.service should be updated to:
Wants=network-online.target
Also set Selinux to disable or permissive to prevent DNSMasq to fail on boot and break network connection
sudo nano /etc/selinux/config
SELINUX=disabled
There is no need to have it loaded on the kernel if you set it disabled. I'd rather not load SELinux at all.
sudo grubby --update-kernel ALL --args selinux=0
Thank you very much @mc0de I had the same issue on my Fedora 39 laptop and your config fixed it 😀
facing the same with Fedora 40, may I understand how to solve the long boot time issue ? already did the fixes for SELinux using grubby and config edit