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:
- Debian 9 Stretch: openresolv 3.8.0-1
- Debian 10 stable Buster: openresolv 3.8.0-1
- Debian testing Bullseye: openresolv 3.12.0-1
- Debian unstable Sid: openresolv 3.12.0-1
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