]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Replace a seq invocation with a shell loop
authorMichal Nowak <mnowak@isc.org>
Tue, 27 Oct 2020 09:30:21 +0000 (10:30 +0100)
committerMichal Nowak <mnowak@isc.org>
Tue, 27 Oct 2020 11:21:53 +0000 (12:21 +0100)
seq is not portable.  Use a while loop instead to make the "dnssec"
system test script POSIX-compatible.

bin/tests/system/dnssec/ns2/sign.sh

index dfe35fea9d929b368125c4e79402c6c4ccdec45f..1bfaa37a04f66467c1cee8d16eedb31ed115759b 100644 (file)
@@ -196,8 +196,10 @@ cat > "$zonefile" << EOF
 ns2    10      A       10.53.0.2
 ns3    10      A       10.53.0.3
 EOF
-for i in $(seq 300); do
+i=1
+while [ $i -le 300 ]; do
     echo "host$i 10 IN NS ns.elsewhere"
+    i=$((i+1))
 done >> "$zonefile"
 key1=$("$KEYGEN" -q -a "$DEFAULT_ALGORITHM" -b "$DEFAULT_BITS" -n zone -f KSK "$zone")
 key2=$("$KEYGEN" -q -a "$DEFAULT_ALGORITHM" -b "$DEFAULT_BITS" -n zone "$zone")