summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'net-dialup/ppp/files/2.4.2b3/ip-up')
-rw-r--r--net-dialup/ppp/files/2.4.2b3/ip-up28
1 files changed, 28 insertions, 0 deletions
diff --git a/net-dialup/ppp/files/2.4.2b3/ip-up b/net-dialup/ppp/files/2.4.2b3/ip-up
new file mode 100644
index 000000000000..afca5d614f0a
--- /dev/null
+++ b/net-dialup/ppp/files/2.4.2b3/ip-up
@@ -0,0 +1,28 @@
+#!/bin/sh
+
+# this is a script which is executed after connecting the ppp interface.
+# look at man pppd for details
+
+# the followings parameters are available:
+# $1 = interface-name
+# $2 = tty-device
+# $3 = speed
+# $4 = local-IP-address
+# $5 = remote-IP-address
+# $6 = ipparam
+
+if [ "$USEPEERDNS" ]; then
+
+ # add the server supplied DNS entries to /etc/resolv.conf
+ /bin/cp -f /etc/resolv.conf /etc/resolv.conf.old
+ /bin/cat /etc/ppp/resolv.conf >> /etc/resolv.conf
+
+ # Change perms because it b0rked kppp
+ chmod 640 /etc/resolv.conf
+ chown root:users /etc/resolv.conf
+
+fi
+
+[ -f /etc/init.d/firewall ] && /etc/init.d/firewall start
+
+[ -f /etc/ppp/ip-up.local ] && . /etc/ppp/ip-up.local