Closed GoogleCodeExporter closed 9 years ago
A simple change to the script should fix this. The change filters the scutil
output
through awk to remove lines other than the nameserver addresses.
Change:
OLDDNS1=$( (scutil | grep '0 : ' | sed -e 's/\ *0 : //')<< EOF
To:
OLDDNS1=$( (scutil | awk '/ServerAddresses/, /\}/' | grep '0 : ' | sed -e 's/\
*0 : //')<< EOF
by inserting " | awk '/ServerAddresses/, /\}/'" just after "scutil".
Do this for both the OLDDNS1 line and the OLDDNS2 line, and you should be all
set.
This works by having awk will only pass on (to grep) lines starting with the
line
containing "ServerAddresses", and ending with the line containing "}".
So only the following will be passed on to grep
ServerAddresses : <array> {
0 : 213.94.78.16
1 : 213.94.78.17
}
and will extract only the two nameserver addresses.
I couldn't test this since I don't have drei.at, so I'd appreciate confirmation
that
it works. (Or if it doesn't -- this problem should not be hard to solve!)
Original comment by jkbull...@gmail.com
on 18 Mar 2009 at 11:39
Thank you very much jkbullard! That did the trick. Tunnelblick should
incorporate this in its up script.
Original comment by raf...@gmail.com
on 18 Mar 2009 at 1:15
Fixed in r94.
Original comment by jkbull...@gmail.com
on 5 Aug 2009 at 2:38
Original issue reported on code.google.com by
raf...@gmail.com
on 25 Feb 2009 at 9:49