update-systemd-resolved
update-systemd-resolved copied to clipboard
script fails line 424 systemd-resolve: unrecognized option '--flush-caches'
I'm on Linux Mint 18.3
sudo openvpn --config pavlos.ovpn I get ...
systemd-resolve: unrecognized option '--flush-caches'
What systemd version?
On Mint 18.3 systemd --version systemd 229 +PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ -LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD -IDN
Current systemd version is 238, you should update your system.
Just revert the change made in https://github.com/jonathanio/update-systemd-resolved/pull/63 and see https://github.com/jonathanio/update-systemd-resolved/issues/62 for more details.
Doesn't make sense a revert because an outdated version of systemd.
Instead we can just evaluate if the --flush-caches is sucess or not and print some warning.
Fixed in #99.
So far:
edu4rdshl ~
❯ busctl call FlushCaches
Too few arguments.
So, we now depend on a specific version of dbus?
@Edu4rdSHL -- It's not busctl call FlushCaches
, it's busctl_call FlushCaches
, where busctl_call
is this function:
busctl_call() {
# Preserve busctl's exit status
busctl call "$DBUS_DEST" "$DBUS_NODE" "${DBUS_DEST}.Manager" "$@" || {
local -i status=$?
emerg "'busctl' exited with status $status"
return $status
}
}
And DBUS_DEST
and DBUS_NODE
are defined here:
# Define what needs to be called via DBus
DBUS_DEST="org.freedesktop.resolve1"
DBUS_NODE="/org/freedesktop/resolve1"
So the full busctl
command line is:
$ busctl call org.freedesktop.resolve1 /org/freedesktop/resolve1 org.freedesktop.resolve1.Manager FlushCaches