diff options
Diffstat (limited to 'debian/extra/ppp_ipv6-updown.sample')
-rw-r--r-- | debian/extra/ppp_ipv6-updown.sample | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/debian/extra/ppp_ipv6-updown.sample b/debian/extra/ppp_ipv6-updown.sample new file mode 100644 index 0000000..d91ca87 --- /dev/null +++ b/debian/extra/ppp_ipv6-updown.sample @@ -0,0 +1,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 |