1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62
|
From: =?utf-8?q?Ond=C5=99ej_Sur=C3=BD?= <ondrej@sury.org>
Date: Thu, 22 Dec 2016 10:42:14 +0100
Subject: Remove bashisms, to make dnssec-trigger script compatible with dash
---
01-dnssec-trigger.in | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/01-dnssec-trigger.in b/01-dnssec-trigger.in
index 8ece20e..998bdc4 100644
--- a/01-dnssec-trigger.in
+++ b/01-dnssec-trigger.in
@@ -70,7 +70,7 @@ global_nameservers="`echo $global_nameservers`"
############################################################
# configure global nameservers using dnssec-trigger-control
if [ -n "`pidof dnssec-triggerd`" ] ; then
- dnssec-trigger-control submit "$global_nameservers" &> /dev/null
+ dnssec-trigger-control submit "$global_nameservers" > /dev/null 2>&1
logger "dnssec-trigger-hook(networkmanager) $ifname $action added global DNS $global_nameservers"
else
logger "dnssec-trigger-hook(networkmanager) $ifname $action NOT added global DNS - dnssec-triggerd is not running"
@@ -83,18 +83,18 @@ if [ -n "`pidof unbound`" ]; then
for domain in `cat $conn_zones_file`; do
# Remove forward zone from unbound
if [ "$validate_forward_zones" = "no" ]; then
- unbound-control forward_remove +i $domain &> /dev/null
+ unbound-control forward_remove +i $domain > /dev/null 2>&1
else
- unbound-control forward_remove $domain &> /dev/null
+ unbound-control forward_remove $domain > /dev/null 2>&1
fi
- unbound-control flush_zone $domain &> /dev/null
- unbound-control flush_requestlist &> /dev/null
+ unbound-control flush_zone $domain > /dev/null 2>&1
+ unbound-control flush_requestlist > /dev/null 2>&1
logger "dnssec-trigger-hook(networkmanager) $ifname $action removed forward DNS zone $domain"
done
# Remove file with zones for this connection
- rm -f $conn_zones_file &> /dev/null
+ rm -f $conn_zones_file > /dev/null 2>&1
fi
if [ "$action" = "vpn-up" -o "$action" = "up" ]; then
@@ -102,12 +102,12 @@ if [ -n "`pidof unbound`" ]; then
for domain in $domains; do
# Add forward zone into unbound
if [ "$validate_forward_zones" = "no" ]; then
- unbound-control forward_add +i $domain $nameservers &> /dev/null
+ unbound-control forward_add +i $domain $nameservers > /dev/null 2>&1
else
- unbound-control forward_add $domain $nameservers &> /dev/null
+ unbound-control forward_add $domain $nameservers > /dev/null 2>&1
fi
- unbound-control flush_zone $domain &> /dev/null
- unbound-control flush_requestlist &> /dev/null
+ unbound-control flush_zone $domain > /dev/null 2>&1
+ unbound-control flush_requestlist > /dev/null 2>&1
# Create zone info file
mkdir -p $(dirname $conn_zones_file)
|