From: Daniel Lenski Date: Mon, 30 Nov 2020 02:24:06 +0000 (-0800) Subject: match preexisting code style X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=21a051aa8aeb51a86f6ec9cea98445224d08900b;p=users%2Fdwmw2%2Fvpnc-scripts.git match preexisting code style Signed-off-by: Daniel Lenski --- diff --git a/vpnc-script b/vpnc-script index 150e0b8..a2bf4a0 100755 --- a/vpnc-script +++ b/vpnc-script @@ -136,7 +136,8 @@ else ifconfig_syntax_ptpv6="" fi -if grep -qs '^hosts.*resolve' /etc/nsswitch.conf 2>/dev/null && (command -v systemd-resolve && systemd-resolve --status) >/dev/null 2>&1; then +grep '^hosts' /etc/nsswitch.conf 2>/dev/null|grep resolve >/dev/null 2>&1 && command systemd-resolve --status >/dev/null 2>&1 +if [ $? = 0 ];then RESOLVEDENABLED=1 else RESOLVEDENABLED=0