aboutsummaryrefslogtreecommitdiffstats
path: root/ppp
diff options
context:
space:
mode:
authorColin Guthrie <colin@mageia.org>2011-10-21 01:28:48 +0100
committerColin Guthrie <colin@mageia.org>2011-10-21 10:10:39 +0100
commitbe75c98a06d569fbaa2d86f92676af961795d094 (patch)
treee2ce8ce7ffb97af34164634a3fbd8630dc7463e8 /ppp
parent4688ea25c9a5a87e48f89fc91a3c93a7c8c95b4a (diff)
downloadinitscripts-be75c98a06d569fbaa2d86f92676af961795d094.tar
initscripts-be75c98a06d569fbaa2d86f92676af961795d094.tar.gz
initscripts-be75c98a06d569fbaa2d86f92676af961795d094.tar.bz2
initscripts-be75c98a06d569fbaa2d86f92676af961795d094.tar.xz
initscripts-be75c98a06d569fbaa2d86f92676af961795d094.zip
Add the mdkconf patch
Diffstat (limited to 'ppp')
-rwxr-xr-x[-rw-r--r--]ppp/ip-down20
-rwxr-xr-x[-rw-r--r--]ppp/ip-down.ipv6to40
-rwxr-xr-x[-rw-r--r--]ppp/ip-up26
-rwxr-xr-x[-rw-r--r--]ppp/ip-up.ipv6to40
4 files changed, 44 insertions, 2 deletions
diff --git a/ppp/ip-down b/ppp/ip-down
index bfb08711..e77af59f 100644..100755
--- a/ppp/ip-down
+++ b/ppp/ip-down
@@ -8,10 +8,30 @@ export PATH
LOGDEVICE=$6
REALDEVICE=$1
+export PATH=/sbin:/usr/sbin:/bin:/usr/bin
+
+cp -f /etc/resolv.conf /etc/resolv.conf.tmp
+fgrep -v "# ppp temp entry" /etc/resolv.conf.tmp > /etc/resolv.conf
+chmod 0644 /etc/resolv.conf
+rm -f /etc/resolv.conf.tmp
+
/etc/ppp/ip-down.ipv6to4 ${LOGDEVICE}
[ -x /etc/ppp/ip-down.local ] && /etc/ppp/ip-down.local "$@"
+# These variables are for the use of the scripts run by run-parts
+PPP_IFACE="$1"
+PPP_TTY="$2"
+PPP_SPEED="$3"
+PPP_LOCAL="$4"
+PPP_REMOTE="$5"
+PPP_IPPARAM="$6"
+export PPP_IFACE PPP_TTY PPP_SPEED PPP_LOCAL PPP_REMOTE PPP_IPPARAM
+
+if [ -d /etc/ppp/ip-down.d/ -a -x /usr/bin/run-parts ]; then
+ /usr/bin/run-parts /etc/ppp/ip-down.d/
+fi
+
/etc/sysconfig/network-scripts/ifdown-post --realdevice ${REALDEVICE} \
ifcfg-${LOGDEVICE}
diff --git a/ppp/ip-down.ipv6to4 b/ppp/ip-down.ipv6to4
index d6e50b54..d6e50b54 100644..100755
--- a/ppp/ip-down.ipv6to4
+++ b/ppp/ip-down.ipv6to4
diff --git a/ppp/ip-up b/ppp/ip-up
index e610674d..bd6d3f97 100644..100755
--- a/ppp/ip-up
+++ b/ppp/ip-up
@@ -1,6 +1,6 @@
#!/bin/bash
# This file should not be modified -- make local changes to
-# /etc/ppp/ip-up.local instead
+# /etc/ppp/ip-up.local or put scripts in /etc/ppp/ip-up.d instead
PATH=/sbin:/usr/sbin:/bin:/usr/bin
export PATH
@@ -8,10 +8,32 @@ export PATH
LOGDEVICE=$6
REALDEVICE=$1
-[ -f /etc/sysconfig/network-scripts/ifcfg-${LOGDEVICE} ] && /etc/sysconfig/network-scripts/ifup-post --realdevice ${REALDEVICE} ifcfg-${LOGDEVICE}
+if [ -f /etc/sysconfig/network-scripts/ifcfg-${LOGDEVICE} ]; then
+ /etc/sysconfig/network-scripts/ifup-post --realdevice ${REALDEVICE} ifcfg-${LOGDEVICE}
+else
+ [ -n "$DNS1" ] && echo "nameserver $DNS1 # ppp temp entry" >> /etc/resolv.conf
+ [ -n "$DNS2" ] && echo "nameserver $DNS2 # ppp temp entry" >> /etc/resolv.conf
+fi
/etc/ppp/ip-up.ipv6to4 ${LOGDEVICE}
[ -x /etc/ppp/ip-up.local ] && /etc/ppp/ip-up.local "$@"
+# These variables are for the use of the scripts run by run-parts
+PPP_IFACE="$1"
+PPP_TTY="$2"
+PPP_SPEED="$3"
+PPP_LOCAL="$4"
+PPP_REMOTE="$5"
+PPP_IPPARAM="$6"
+export PPP_IFACE PPP_TTY PPP_SPEED PPP_LOCAL PPP_REMOTE PPP_IPPARAM
+
+if [ -d /etc/ppp/ip-up.d/ -a -x /usr/bin/run-parts ]; then
+ /usr/bin/run-parts /etc/ppp/ip-up.d/
+fi
+
+if [ -x /usr/sbin/sendmail ];then
+ /usr/sbin/sendmail -q 2>/dev/null >/dev/null &
+fi
+
exit 0
diff --git a/ppp/ip-up.ipv6to4 b/ppp/ip-up.ipv6to4
index b2f6e6e6..b2f6e6e6 100644..100755
--- a/ppp/ip-up.ipv6to4
+++ b/ppp/ip-up.ipv6to4