]> www.infradead.org Git - users/dwmw2/vpnc-scripts.git/commitdiff
match preexisting code style
authorDaniel Lenski <dlenski@gmail.com>
Mon, 30 Nov 2020 02:24:06 +0000 (18:24 -0800)
committerDaniel Lenski <dlenski@gmail.com>
Mon, 30 Nov 2020 19:37:24 +0000 (19:37 +0000)
Signed-off-by: Daniel Lenski <dlenski@gmail.com>
vpnc-script

index 150e0b80e4bcab995455b25055a674b6edd45286..a2bf4a09a1b1fee5de0a9a0ad0bba705634ecd15 100755 (executable)
@@ -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