resolvconf broken on Raspberry Pi (Too few arguments)

As discovered in openconnect#273, the Debian/Ubuntu resolvconf script provided by package openresolv 3.8.0-1 is broken and results in Too few arguments error messages. Around line 272 in version 3.8.0, RESTARTCMD is initialised to:

	if [ -x /bin/systemctl -a -S /run/systemd/private ]; then
		RESTARTCMD="if /bin/systemctl --quiet is-active; then
	/bin/systemctl restart \$1.service;
fi"

Clearly, RESTARTCMD should have been initialised to:

if /bin/systemctl --quiet is-active $1.service; then /bin/systemctl restart $1.service; fi

instead of:

if /bin/systemctl --quiet is-active; then /bin/systemctl restart $1.service; fi

This has been fixed in later versions of openresolv, the relevant commit 4c54816 had been merged two months after the openresolv-3.8.0 tag and a few days before the openresolv-3.8.1 tag.

It looks like we're currently stuck with the broken version 3.8.0 on stable Debian versions:

Strangely enough, this issue mainly comes up on Raspberry Pi:

How to mitigate this? A Debian bug report? Detection of the broken resolvconf script?

Edited by Dimitri Papadopoulos Orfanos