]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/commitdiff
Work around for Bad DNS Servers at UMTS-Connections
authorArne Fitzenreiter <arne_f@ipfire.org>
Wed, 13 May 2009 16:41:01 +0000 (18:41 +0200)
committerArne Fitzenreiter <arne_f@ipfire.org>
Wed, 13 May 2009 16:41:01 +0000 (18:41 +0200)
Change gateway ip to currect ip
Remove Error (3min wait) at startup if the first connection try fail...

src/initscripts/init.d/collectd
src/initscripts/init.d/networking/red
src/ppp/ip-up

index a63aea05c828362e79b80c59767e84a2c28e5108..74ff3fdc82e84722bc3d9988b74aefa96edc7dcf 100644 (file)
@@ -59,7 +59,7 @@ case "$1" in
                fi
 
                # Enable sensors plugin if sensors found
-               if [ $( sensors 2>&1 | grep "No sensors found!" | wc -l ) == "1" ]; then
+               if [ "$( sensors 2>&1 | grep 'No sensors found!' | wc -l )" == "1" ]; then
                        sed -i -e "s|^LoadPlugin sensors|#LoadPlugin sensors|g" /etc/collectd.conf
                else
                        sed -i -e "s|^#LoadPlugin sensors|LoadPlugin sensors|g" /etc/collectd.conf
index 6f9fcd06457eb7008d1965720ae0e02edb463a9d..1a795830604e82411ebb4501f3b00db67bc84b42 100644 (file)
@@ -366,6 +366,7 @@ case "${1}" in
                        /usr/bin/vnstat -u -i ppp0 -r --enable --force > /dev/null 2>&1
                        /etc/rc.d/init.d/connectd start
                        /etc/rc.d/init.d/collectd start
+                       exit 0
                fi
                ;;
 
index 9168eef40c3dc393e92d57f31121f1472ef4a737..5c456992141b1d87ad6ba20eaf76d2edc47b4fe0 100644 (file)
@@ -32,14 +32,19 @@ if [ "$DNS" == "Automatic" ]; then
                echo -n "$MS_DNS1" > /var/ipfire/red/dns1
                echo -n "$MS_DNS2" > /var/ipfire/red/dns2
        else
-               echo -n "$PRIMARY_DNS" > /var/ipfire/red/dns1
-               echo -n "$SECONDARY_DNS" > /var/ipfire/red/dns2
+               if [ "$PRIMARY_DNS" != "10.11.12.13" || "$SECONDARY_DNS" != "10.11.12.14" ]; then
+                       echo -n "$PRIMARY_DNS" > /var/ipfire/red/dns1
+                       echo -n "$SECONDARY_DNS" > /var/ipfire/red/dns2
+               else
+                       echo -n "$DNS1" > /var/ipfire/red/dns1
+                       echo -n "$DNS2" > /var/ipfire/red/dns2
+               fi
        fi
 else
        echo -n "$DNS1" > /var/ipfire/red/dns1
        echo -n "$DNS2" > /var/ipfire/red/dns2
 fi
-
+7
 echo -n "$1" > /var/ipfire/red/iface
 echo -n "$4" > /var/ipfire/red/local-ipaddress
 echo -n "$5" > /var/ipfire/red/remote-ipaddress
@@ -65,7 +70,7 @@ else
            echo "$FIRE gateway" >> /tmp/hosts
        else
            #DNS lookup failed use direct ip
-           echo "85.88.28.124  gateway" >> /tmp/hosts
+           echo "85.88.28.125  gateway" >> /tmp/hosts
        fi
 fi
 mv /tmp/hosts /etc/hosts