mirror of
https://github.com/OpenVPN/openvpn.git
synced 2026-05-28 04:03:29 -04:00
Prevent generation of duplicate EXPECT_IFCONFIG entries
Previously, if t_client.rc did not source t_client_ips.rc, update_t_client_ips.sh would add (the same) EXPECT_IFCONFIG entries to t_client_ips.rc on every run. This patch makes update_t_client_ips.sh check if the entry exists before trying to add it. v2: prevent partial matches of the EXCEPT_IFCONFIG variable name Signed-off-by: Samuli Seppänen <samuli@openvpn.net> Acked-by: Gert Doering <gert@greenie.muc.de> Message-Id: <1478613963-28077-1-git-send-email-samuli@openvpn.net> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg12965.html Signed-off-by: Gert Doering <gert@greenie.muc.de>
This commit is contained in:
parent
6f17e18be0
commit
82a601f1e2
1 changed files with 11 additions and 2 deletions
|
|
@ -3,5 +3,14 @@
|
|||
# This --up script caches the IPs handed out by the test VPN server to a file
|
||||
# for later use.
|
||||
|
||||
echo "EXPECT_IFCONFIG4_$TESTNUM=$ifconfig_local" >> $TOP_BUILDDIR/t_client_ips.rc
|
||||
echo "EXPECT_IFCONFIG6_$TESTNUM=$ifconfig_ipv6_local" >> $TOP_BUILDDIR/t_client_ips.rc
|
||||
RC="$TOP_BUILDDIR/t_client_ips.rc"
|
||||
|
||||
grep EXPECT_IFCONFIG4_$TESTNUM= $RC > /dev/null 2>&1
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "EXPECT_IFCONFIG4_$TESTNUM=$ifconfig_local" >> $RC
|
||||
fi
|
||||
|
||||
grep EXPECT_IFCONFIG6_$TESTNUM= $RC > /dev/null 2>&1
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "EXPECT_IFCONFIG6_$TESTNUM=$ifconfig_ipv6_local" >> $RC
|
||||
fi
|
||||
|
|
|
|||
Loading…
Reference in a new issue