summaryrefslogtreecommitdiffstats
path: root/usr/local/sbin
diff options
context:
space:
mode:
authorsmos <seth.mos@dds.nl>2012-05-14 14:54:04 +0200
committersmos <seth.mos@dds.nl>2012-05-14 14:54:04 +0200
commite32cb5d08d313f8265038e66a91ac96d4232ec53 (patch)
treed74e0364a81256d97b8f6f229caabf1f3c9b3442 /usr/local/sbin
parente6b16f8945c44bec5c6b459d097d754083408b53 (diff)
downloadpfsense-e32cb5d08d313f8265038e66a91ac96d4232ec53.zip
pfsense-e32cb5d08d313f8265038e66a91ac96d4232ec53.tar.gz
Make the ppp-linkup script understand both address families.
Diffstat (limited to 'usr/local/sbin')
-rwxr-xr-xusr/local/sbin/ppp-linkup17
1 files changed, 13 insertions, 4 deletions
diff --git a/usr/local/sbin/ppp-linkup b/usr/local/sbin/ppp-linkup
index 42e0705..92afcab 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 -c dnsallowoverride /conf/config.xml`
if [ $ALLOWOVERRIDE -gt 0 ]; then
OpenPOWER on IntegriCloud