in reply to Re: Systemd Network Problem
in thread Systemd Network Problem

Yup, I already found that inserting an initial sleep would resolve the problem, but I couldn't understand why; now I do! Thanks a million. The code segment is part of the DnsPixie.pl program which you can find at http://www.cpan.org/scripts/. It's intended to update dynamic DNS records when the host address changes. And it actually works well on other (Ubuntu, OpenBSD, Windows-XP, etc.) platforms. So I guess I need to force a cache refresh at each pass? Perhaps by a call to gethostbyname? Or .. ??

Replies are listed 'Best First'.
Re^3: Systemd Network Problem
by Anonymous Monk on Jun 14, 2015 at 13:16 UTC
    In glibc, there is res_init function to reread resolv.conf. I'm not sure whether it's possible to call it from Perl without writing XS/Inline::C.