Kevin Fenzi writes:
I suggest the OP misunderstood the setup or intended setup.
The scriptlets will set /etc/resolv.conf to point to the
systemd-resolved resolver if:
* The /etc/resolv.conf file doesn't exist yet
AND
* systemd is being used to boot (so, it's not a container, etc)
AND
* systemd-resolved service is enabled
AND
* DNSStubListener is not set to no/false/off in systemd/resolved.conf
That's the first ln -s call in the scriptlet.
Now, look at the second one, the one with the -f flag.