From 3a6b7be61ac32b62c7b2ff82bfc61679df4413ba Mon Sep 17 00:00:00 2001 From: Alejandro Mery Date: Wed, 13 Oct 2010 13:29:17 +0200 Subject: [PATCH] rocknet: enhanced `nameserver` to handler more than one address each time --- network/rocknet/rocknet_dns.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/network/rocknet/rocknet_dns.sh b/network/rocknet/rocknet_dns.sh index 677d1b552..a8819fb10 100644 --- a/network/rocknet/rocknet_dns.sh +++ b/network/rocknet/rocknet_dns.sh @@ -2,6 +2,7 @@ # This copyright note is auto-generated by ./scripts/Create-CopyPatch. # # Filename: package/.../rocknet/rocknet_dns.sh +# Copyright (C) 2010 The OpenSDE Project # Copyright (C) 2004 - 2006 The T2 SDE Project # # More information can be found in the files COPYING and README. @@ -14,12 +15,15 @@ dns_init() { if isfirst "dns"; then - addcode up 4 1 "echo -n "" > /etc/resolv.conf" + addcode up 4 1 "cat /dev/null > /etc/resolv.conf" fi } public_nameserver() { - addcode up 4 5 "echo nameserver $1 >> /etc/resolv.conf" + local x= + for x; do + addcode up 4 5 "echo nameserver $x >> /etc/resolv.conf" + done dns_init } @@ -41,4 +45,3 @@ public_domainname() { # THIS IS (still) A HACK addcode up 9 5 "sed -i 's/`hostname`\..* /`hostname`.$1 /' /etc/hosts" } -