On Tue, 2025-04-22 at 09:11 +0100, Barry Scott wrote: > > > > On 21 Apr 2025, at 16:16, Gabriel L. Somlo <gso...@gmail.com> > > wrote: > > > > I'm not quite sure if (and how) one could express "whatever's > > sitting > > behind hostnamectl has finally replaced `fedora` with > > `foo42.example.com` in the transient hostname field", to make > > sendmail.service wait for (depend on) that trigger... > > In cases like this when network on-line is not sufficient I have > written > a service that waits for the particular event. In your case a service > that > waits for the hostname to be set would seem to be needed. > > FYI you might ask the systemd folks if there is a solution that's not > been suggested here.
I wasn't going to comment, although over the years I've seen times when network on-line isn't sufficient, but a practical alternative may be to drop in a NetworkManager script in dispatcher.d that restarts sendmail after an appropriate DHCP step. If you look in /usr/lib/NetworkManager/dispatcher.d there is already a 10-sendmail script, which restarts it on internface up or down, but you can maybe modify it with something from 20-chrony-dhcp, which also tests for "dhcp4-change" and "dhcp6-change". > > Barry > Regards Frank -- _______________________________________________ devel mailing list -- devel@lists.fedoraproject.org To unsubscribe send an email to devel-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue