1
|
#!/bin/sh
|
2
|
|
3
|
# let the configuration system know that the ip has changed.
|
4
|
#/usr/local/sbin/pfSctl -c "interface newip $interface"
|
5
|
|
6
|
if [ "${dev_type}" = "tun" ]; then
|
7
|
if [ -n "${route_vpn_gateway}" ]; then
|
8
|
/bin/echo ${route_vpn_gateway} > /tmp/${1}_router
|
9
|
elif [ -n "${ifconfig_remote}" ]; then
|
10
|
/bin/echo ${ifconfig_remote} > /tmp/${1}_router
|
11
|
elif [ -n "${ifconfig_local}" ]; then
|
12
|
/bin/echo ${ifconfig_local} > /tmp/${1}_router
|
13
|
else
|
14
|
/bin/echo ${5} > /tmp/${1}_router
|
15
|
fi
|
16
|
fi
|
17
|
|
18
|
/usr/bin/touch /tmp/${1}up
|
19
|
# reload filter
|
20
|
/usr/local/sbin/pfSctl -c "interface newip ${1}"
|
21
|
exit 0
|