]> www.infradead.org Git - users/dwmw2/vpnc-scripts.git/commitdiff
vpnc-script: squelch EEXIST from grep
authorRobin H. Johnson <robbat2@gentoo.org>
Wed, 20 Jun 2018 06:26:38 +0000 (06:26 +0000)
committerDavid Woodhouse <dwmw2@infradead.org>
Wed, 24 Apr 2019 14:59:27 +0000 (16:59 +0200)
In a container, /etc/nsswitch.conf might not exist.
Silence the error grep: /etc/nsswitch.conf: No such file or directory

Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
vpnc-script

index a046e6534df2ab58db45379f72c91d8a316881fa..3cde5feb6be98a2936ff6ffac74fa5a3293ffbd2 100755 (executable)
@@ -116,7 +116,7 @@ else
        ifconfig_syntax_ptpv6=""
 fi
 
-grep ^hosts /etc/nsswitch.conf|grep resolve >/dev/null 2>&1
+grep ^hosts /etc/nsswitch.conf 2>/dev/null|grep resolve >/dev/null 2>&1
 if [ $? = 0 ];then
        RESOLVEDENABLED=1
 else