summaryrefslogtreecommitdiffstats
path: root/debian/extra/ppp_ipv6-updown.sample
blob: d91ca872d4ba54bea7182a51b2e17132fc8cb972 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/sh
# sample file for /etc/ppp/ipv6-{up,down}.d/ script
# 2015, Roger Shimizu

if [ -z "$CONNECT_TIME" ]; then
	if [ "$PPP_IPPARAM" = "ipv6defaultroute" ]; then
		ip -6 r flush default
		ip -6 r add default dev $PPP_IFACE
	fi
	if [ -r /var/run/dhcp6c.pid ]; then
		service wide-dhcpv6-client restart
	else
		service wide-dhcpv6-client start
	fi
else
	[ -r /var/run/dhcp6c.pid ] &&
		service wide-dhcpv6-client stop
fi

exit 0