[Openvpn-devel] resolvconf fails with -p

Message ID 20210529013516.767555-1-sergio@outerface.net
State New
Headers show
Series
  • [Openvpn-devel] resolvconf fails with -p
Related show

Commit Message

sergio May 29, 2021, 1:35 a.m.
From: "Sergio E. Nemirowski" <sergio@outerface.net>

resolvconf -p
resolvconf: Error: Command not recognized

Signed-off-by: Sergio E. Nemirowski <sergio@outerface.net>
---
 contrib/pull-resolv-conf/client.up | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Gert Doering May 29, 2021, 7:16 a.m. | #1
Hi,

On Sat, May 29, 2021 at 04:35:16AM +0300, sergio wrote:
> From: "Sergio E. Nemirowski" <sergio@outerface.net>
> 
> resolvconf -p
> resolvconf: Error: Command not recognized

Which platform does this fail on?  The fact that the -p is currently there
hints at "on some other platforms this works and is useful"...

gert
sergio May 29, 2021, 12:23 p.m. | #2
> Which platform does this fail on?  The fact that the -p is currently there
> hints at "on some other platforms this works and is useful"...

Debian bullseye & sid, v1.87

Patch

diff --git a/contrib/pull-resolv-conf/client.up b/contrib/pull-resolv-conf/client.up
index f0769740..220aeb74 100644
--- a/contrib/pull-resolv-conf/client.up
+++ b/contrib/pull-resolv-conf/client.up
@@ -91,7 +91,7 @@  out="# resolv.conf autogenerated by ${0} (${dev})${nl}${dns}${ds}${domains}"
 
 # use resolvconf if it's available
 if type resolvconf >/dev/null 2>&1; then
-  printf "%s\n" "${out}" | resolvconf -p -a "${dev}"
+  printf "%s\n" "${out}" | resolvconf -a "${dev}"
 else
   # Preserve the existing resolv.conf
   if [ -e /etc/resolv.conf ] ; then