Attention is currently required from: flichtenheld, plaisthos. Hello plaisthos, flichtenheld,
I'd like you to do a code review. Please visit http://gerrit.openvpn.net/c/openvpn/+/1144?usp=email to review the following change. Change subject: dns: fix systemd dns-updown script ...................................................................... dns: fix systemd dns-updown script In the resolvconf part of the script there was one instance of a dynamic variable using _* left. The _* ones do not work as the regular ones, but only when you directly place them within ${!}, not indirectly using a variable. Convert the code to use a loop and a check, like in all the other places in the script. Change-Id: Id800cad0e92e0abc0d96079fdb5a9d57578e1446 Signed-off-by: Heiko Hund <he...@ist.eigentlich.net> --- M distro/dns-scripts/systemd-dns-updown.sh 1 file changed, 5 insertions(+), 3 deletions(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/44/1144/1 diff --git a/distro/dns-scripts/systemd-dns-updown.sh b/distro/dns-scripts/systemd-dns-updown.sh index 9006e28..ed3947a 100644 --- a/distro/dns-scripts/systemd-dns-updown.sh +++ b/distro/dns-scripts/systemd-dns-updown.sh @@ -189,11 +189,13 @@ domains+="${!domain_var} " done { + local i=1 local maxns=3 - local server_var=dns_server_${n}_address_* - for addr_var in ${!server_var}; do - [ $((maxns--)) -gt 0 ] || break + while [ "${i}" -le "${maxns}" ]; do + local addr_var=dns_server_${n}_address_${i} + [ -n "${!addr_var}" ] || break echo "nameserver ${!addr_var}" + i=$((i+1)) done [ -z "$domains" ] || echo "search $domains" } | /sbin/resolvconf -a "$dev" -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/1144?usp=email To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings Gerrit-Project: openvpn Gerrit-Branch: master Gerrit-Change-Id: Id800cad0e92e0abc0d96079fdb5a9d57578e1446 Gerrit-Change-Number: 1144 Gerrit-PatchSet: 1 Gerrit-Owner: d12fk <he...@openvpn.net> Gerrit-Reviewer: flichtenheld <fr...@lichtenheld.com> Gerrit-Reviewer: plaisthos <arne-open...@rfc2549.org> Gerrit-CC: openvpn-devel <openvpn-devel@lists.sourceforge.net> Gerrit-Attention: plaisthos <arne-open...@rfc2549.org> Gerrit-Attention: flichtenheld <fr...@lichtenheld.com> Gerrit-MessageType: newchange
_______________________________________________ Openvpn-devel mailing list Openvpn-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openvpn-devel