aboutsummaryrefslogtreecommitdiff
path: root/net/mpd-l2tp-ipv6pd-client/scripts/linkup.sh.in
blob: 02cc46253a8c78c7511bfbfec938898fec11895d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/bin/sh
#
# link up
#linkup.sh <interface> <family> <local address> <remote address> <authname>
#

iface=$1
family=$2
myaddr=$3
hisaddr=$4

case ${family} in
inet6)
	(
		sleep $(($(sysctl -n net.inet6.ip6.dad_count) + 1))
		%%PREFIX%%/%%CONF_DIR%%/dhcp6c_pd.sh start ${iface}
	) &
	case ${iface} in
	*)
		/sbin/route delete -inet6 default
		/sbin/route add -inet6 default ::1 -ifp ${iface}
		;;
	esac
	;;
esac