dhcpcd-discuss

Re: Multiple static DNS addresses

Leonardo Guilherme

Fri Jul 20 13:31:38 2012

2012/7/20 Leonardo Guilherme <leonardo.guilherme@xxxxxxxxx>

>
>
> 2012/7/20 Roy Marples <roy@xxxxxxxxxxxx>
>
>> Hi
>>
>> On 19/07/2012 18:17, Leonardo Guilherme wrote:
>> > What is the correct way to pass a list of multiple static dns as an
>> > command line argument to dhcpcd?
>> >
>> > I've been trying
>> >
>> > dhcpcd --noipv4ll -S domain_name_servers=10.4.50.1 10.0.0.17 10.0.0.11
>> > eth0 and
>> > dhcpcd --noipv4ll -S domain_name_servers="10.4.50.1 10.0.0.17 10.0.0.11"
>> >
>> > but none of them works, dhcpcd thinks that the last two ips are
>> interfaces.
>>
>> That works fine for me.
>> Maybe it's a quoting issue? What shell are you using, or is that a
>> command somewhere?
>>
>
> A command inside python it is. I am trying to fix an issue with wicd (
> https://bugs.launchpad.net/wicd/+bug/145405) with static dns. It writes
> /etc/resolv.conf after a connection is estabilished but everytime dhcpcd
> renews a lease, /etc/resolv.conf is rewritten with information from the
> dhcp server, which is not desirable in this case.
>
> The command is something like this:
>
> dhcpcd -h host --noipv4ll -S %s eth0 % ' '.join(dns)
>

Actually it is

dhcpcd -h host --noipv4ll -S domain_name_servers=%s eth0 % ' '.join(dns)


>
> where dns is an array of dns ips. I tried quoting "%s" and \"%s\" but none
> worket.
>
> Since you said it actually works, probably it is just my bad python
> skills. I'll play a little more with it.
>
> Thanks.
>
> Leonardo.
>

Follow-Ups:
Re: Multiple static DNS addressesRoy Marples
References:
Multiple static DNS addressesLeonardo Guilherme
Re: Multiple static DNS addressesRoy Marples
Re: Multiple static DNS addressesLeonardo Guilherme
Archive administrator: postmaster@marples.name