]> 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:26:03 +0000 (12:26 +0100)
seq is not portable.  Use a while loop instead to make the "dnssec"
system test script POSIX-compatible.

(cherry picked from commit c0c4c024c64018aefe655103fcba6f6fa9ec7581)

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

index 475254dbe031ed06bccabc9e37615543ffb08269..b255d37c2be05fb1e33e8bfd18d1b2ceb66c65da 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")