From 310c29c6a6089f1766ac052572b532e736a2251b Mon Sep 17 00:00:00 2001 From: smos Date: Mon, 14 May 2012 14:54:04 +0200 Subject: Make the ppp-linkup script understand both address families. --- usr/local/sbin/ppp-linkup | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'usr/local') diff --git a/usr/local/sbin/ppp-linkup b/usr/local/sbin/ppp-linkup index 12dda9b..e0fb0c2 100755 --- a/usr/local/sbin/ppp-linkup +++ b/usr/local/sbin/ppp-linkup @@ -1,9 +1,18 @@ #!/bin/sh -# let the configuration system know that the ip has changed. -/bin/echo $4 > /tmp/$1_router -/bin/echo $3 > /tmp/$1_ip -/usr/bin/touch /tmp/$1up +if [ "$2" == "inet" ]; then + # let the configuration system know that the ipv4 has changed. + /bin/echo $4 > /tmp/$1_router + /bin/echo $3 > /tmp/$1_ip + /usr/bin/touch /tmp/$1up +fi + +if [ "$2" == "inet6" ]; then + # let the configuration system know that the ipv6 has changed. + /bin/echo $4 |cut -d% -f1 > /tmp/$1_routerv6 + /bin/echo $3 |cut -d% -f1 > /tmp/$1_ipv6 + /usr/bin/touch /tmp/$1upv6 +fi ALLOWOVERRIDE=`/usr/bin/grep dnsallowoverride /conf/config.xml | /usr/bin/wc -l` if [ $ALLOWOVERRIDE -gt 0 ]; then -- cgit v1.1