summaryrefslogtreecommitdiff
path: root/noncore/settings/networksettings2/etc_ppp/ip-up_down/U_DNS
Unidiff
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