[maemo-developers] [maemo-developers] Local DNS

From: Marius Gedminas marius at pov.lt
Date: Wed Jan 31 14:47:59 EET 2007
I received a copy of this email (with a different message-ID)
personally, and I replied to it personally.  Here's my reply, because I
think it may be useful to others.

On Wed, Jan 31, 2007 at 11:21:12AM +0000, andrew gatt wrote:
> >Okay, it's https://maemo.org/bugzilla/show_bug.cgi?id=995 now.
> Can anyone suggest a programmable work around for this problem?

Sure, get root and hack the DHCP scripts in /etc to update

> I'm 
> trying to keep a client / server situation simple to set up. As the 
> tablet requires DHCP to function (by default) i was going to make the 
> server use DHCP and set up dynamic DNS so the tablet can find the server 
> with just the name. However as pointed out this doesn't work i.e. just 
> putting the 'myserver' in the address bar of the browser.
> Additionally, adding the domain does not work so 'myserver.mydomain' 
> does not resolve to the right address.

Whoa.  Now this works for me.  Are you sure your DNS/DHCP servers are
configured properly?

> I'm guessing this is because the 
> /tmp/resolv.conf.wlan0 has 'domain mydomain' as the first line and not 
> 'search mydomain'.

Shouldn't matter.

> When i gain root access i can add 'search mydomain' to /etc/resolv.conf 
> and it works, but i don't want to have to gain root from inside a 
> program (not even sure its possible?). Is there anyway to get the tablet 
> to resolve the name?

Yes, hack the scripts in /etc/udhcpc/.  I think the only file that is
actually used is udhcpc.script, but that's my personal guess.  Add
something like

    echo nameserver > /etc/resolv.conf
    echo search $domain >> /etc/resolv.conf

to the 'bound|renew)' part in the case statement.

Uh, I'm not responsible if fiddling with that file breaks your N770. ;)

> Also could anyone tell me if this bug exists on the N800 as well?

I don't have one yet.

Marius Gedminas
Unix is the answer, but only if you phrase the question very carefully.
                -- Belinda Asbell
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.maemo.org/pipermail/maemo-developers/attachments/20070131/9485c97a/attachment.pgp 
More information about the maemo-developers mailing list