diff --git a/CHANGELOG b/CHANGELOG index b044dc7..d747a5d 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -104,6 +104,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 * etc-git: Remove deprecated/unsupported "warn" parameter * ospf, bgp: fix checks scripts * base, collectd, etc-git, logsentry, nagios-nrpe: install packages manually because openbsd_pkg module is broken since OpenBSD 7.4 with the version of Ansible we currently use +* nagios-nrpe: fix variable use in check_ipsecctl_critiques.sh ### Removed diff --git a/roles/nagios-nrpe/files/plugins_bsd/check_ipsecctl_critiques.sh b/roles/nagios-nrpe/files/plugins_bsd/check_ipsecctl_critiques.sh index b43e086..a27b917 100755 --- a/roles/nagios-nrpe/files/plugins_bsd/check_ipsecctl_critiques.sh +++ b/roles/nagios-nrpe/files/plugins_bsd/check_ipsecctl_critiques.sh @@ -72,8 +72,8 @@ if [ $STATUS -eq 0 ]; then # Definition of the source IP of the ping according to the source network used (our side, adjust the -I option) case $vpn in *vlan1*) - for i in $dst_ip; do - ping -q -i 0.1 -I 192.168.5.5 -c 3 -w 1 "$dst_ip" >/dev/null + for ip in $dst_ip; do + ping -q -i 0.1 -I 192.168.5.5 -c 3 -w 1 "$ip" >/dev/null if [ $? -eq 0 ]; then pingok=$(($pingok + 1)) fi @@ -81,8 +81,8 @@ if [ $STATUS -eq 0 ]; then ;; *vlan2*) - for i in $dst_ip; do - ping -q -i 0.1 -I 172.16.2.5 -c 3 -w 1 "$dst_ip" >/dev/null + for ip in $dst_ip; do + ping -q -i 0.1 -I 172.16.2.5 -c 3 -w 1 "$ip" >/dev/null if [ $? -eq 0 ]; then pingok=$(($pingok + 1)) fi