File: update_t_client_ips.sh

package info (click to toggle)
openvpn 2.4.7-1%2Bdeb10u1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 9,384 kB
  • sloc: ansic: 79,936; sh: 5,572; makefile: 490; javascript: 73; perl: 66; python: 47
file content (16 lines) | stat: -rwxr-xr-x 426 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/sh
#
# This --up script caches the IPs handed out by the test VPN server to a file
# for later use.

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