| Tuesday, 03 February 2009 20:44 |
|
Eeepc Huawei E169/E220 DNS Internet fix I recently bought a E169 Dongle for EEEpc, all was going well until i tried to resolve a name. No matter what we tried the Nameservers would not save. We tried - chattr +i /etc/resolv.conf which still didnt resolve the issue. One of our guys decided to write a script to fix it. Create the following script in /etc/ppp/ip-up.d Call it what you like, as long as you prefix it with 'yyy'. E.g. yyy_dns_fix Make it executable with chmod 755 <your filename> The script is automatically executed each time a PPP connection is initiated, so once you've created it you shouldn't need to do anything else. Change the DNS IP's in the script below to your ISPs'.
#!/bin/bash
LOG=/tmp/dns.log
date > $LOG
set | grep DNS1 >> $LOG
if [[ $DNS1 == "10.11.12.13" ]]; then
echo "nameserver 123.123.123.123" > /etc/resolv.conf
echo "nameserver 12.12.12.12" >> /etc/resolv.conf
echo "DNS updated..." >> $LOG
else
echo "No action required" >> $LOG
fi
|