summaryrefslogtreecommitdiff
path: root/noncore/settings/networksettings2/etc_ppp/ip-up_down/U_DNS
authorwimpie <wimpie>2005-01-04 01:41:58 (UTC)
committer wimpie <wimpie>2005-01-04 01:41:58 (UTC)
commite2094d408c9102f8866aafbe725a65f25fdef063 (patch) (unidiff)
treedaf1e8c3ea18ff8ad55a80a16440fbe422698479 /noncore/settings/networksettings2/etc_ppp/ip-up_down/U_DNS
parent2a7afda8b7daf4a43e370dba09e43e7f5058ab49 (diff)
downloadopie-e2094d408c9102f8866aafbe725a65f25fdef063.zip
opie-e2094d408c9102f8866aafbe725a65f25fdef063.tar.gz
opie-e2094d408c9102f8866aafbe725a65f25fdef063.tar.bz2
Scripts to manage routes and DNS information for ppp
Diffstat (limited to 'noncore/settings/networksettings2/etc_ppp/ip-up_down/U_DNS') (more/less context) (ignore whitespace changes)
-rwxr-xr-xnoncore/settings/networksettings2/etc_ppp/ip-up_down/U_DNS30
1 files changed, 30 insertions, 0 deletions
diff --git a/noncore/settings/networksettings2/etc_ppp/ip-up_down/U_DNS b/noncore/settings/networksettings2/etc_ppp/ip-up_down/U_DNS
new file mode 100755
index 0000000..55cec63
--- a/dev/null
+++ b/noncore/settings/networksettings2/etc_ppp/ip-up_down/U_DNS
@@ -0,0 +1,30 @@
1#!/bin/sh
2exec 2> /tmp/RES
3set -x
4CMD=`basename $0`
5RESOLV=/etc/resolv.conf
6FIXED=/etc/ppp/$6.fixed
7
8case $CMD in
9 U_*)
10 if [ -f $FIXED ]
11 then
12 # ADD FIXED dns ENTRIES
13 grep "nameserver " $FIXED >> "$RESOLV"
14 else
15 if [ "$DNS1" ] ; then
16 echo '' >> "$RESOLV"
17 echo "nameserver $DNS1 # profile $6" >> "$RESOLV"
18 if [ "$DNS2" ] ; then
19 echo '' >> "$RESOLV"
20 echo "nameserver $DNS2 # profile $6" >> "$RESOLV"
21 fi
22 fi
23 fi
24 ;;
25 D_*)
26 grep -v "profile $6" $RESOLV > /tmp/xx
27 mv /tmp/xx $RESOLV
28 ;;
29esac
30exit 0