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 <[email protected]>
---
 vpnc-script | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/vpnc-script b/vpnc-script
index b185ad2..0ce5bd5 100755
--- a/vpnc-script
+++ b/vpnc-script
@@ -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
-- 
2.14.1


_______________________________________________
openconnect-devel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/openconnect-devel

Reply via email to