Hi Folks,
I would like to change the domain name given out by dnsmasq via DHCP. It seems, however, to be always "lan" nevertheless what I change in my config :-(
I have tried to
- set the nvram variable "wan_domain"
- cat it's content into /proc/sys/kernel/domainname in S10boot (as already done by hostname)
- added a domain suffix to hostname, so it is now "router.mydomain"
- passed the -s option to dnsmasq:
root@router:/usb/home/root# cat /etc/init.d/S50dnsmasq
#!/bin/sh
. /etc/functions.sh
# interface to use for DHCP
iface=lan
ifname=$(nvram get ${iface}_ifname)
ipaddr=$(nvram get ${iface}_ipaddr)
netmask=$(nvram get ${iface}_netmask)
# check for existing DHCP server
udhcpc -n -q -R -s /bin/true -i $ifname >&- || {
ipaddr=$(ip2int $ipaddr)
netmask=$(ip2int ${netmask:-255.255.255.0})
network=$((ipaddr&netmask))
start=$(nvram get dhcp_start)
start=$((network+${start:-100}))
end=$(nvram get dhcp_num)
end=$((start+${end:-150}))
args="-l /var/dhcp.leases -s mydomain --log-queries --bogus-priv --filterwin2k --domain-needed -K -F $(int2ip $start),$(int2ip $end),$(int2ip $netmask),12h"
}
dnsmasq ${args}However, dnsmasq still assumes "lan" as domain name:
<snip from log>
Aug 24 22:06:08 (none) kern.info dnsmasq[1220]: reading /etc/resolv.conf
Aug 24 22:06:08 (none) kern.info dnsmasq[1220]: using nameserver 145.253.2.203#53
Aug 24 22:06:08 (none) kern.info dnsmasq[1220]: using nameserver 195.50.140.250#53
Aug 24 22:06:08 (none) kern.info dnsmasq[1220]: using local addresses only for domain lan
Aug 24 22:06:08 (none) kern.info dnsmasq[1220]: exiting on receipt of SIGTERM
Aug 24 22:06:40 (none) kern.info dnsmasq[1435]: started, version 2.22 cachesize 150
Aug 24 22:06:40 (none) kern.info dnsmasq[1435]: DHCP, IP range 192.168.1.10 -- 192.168.1.60, lease time 12h
Aug 24 22:06:40 (none) kern.info dnsmasq[1435]: using local addresses only for domain lan
Aug 24 22:06:40 (none) kern.info dnsmasq[1435]: read /etc/hosts - 2 addresses
Aug 24 22:06:40 (none) kern.err dnsmasq[1435]: failed to read /etc/ethers:No such file or directory
Aug 24 22:06:40 (none) kern.info dnsmasq[1435]: reading /etc/resolv.conf
Aug 24 22:06:40 (none) kern.info dnsmasq[1435]: using nameserver 145.253.2.203#53
Aug 24 22:06:40 (none) kern.info dnsmasq[1435]: using nameserver 195.50.140.250#53
Aug 24 22:06:40 (none) kern.info dnsmasq[1435]: using local addresses only for domain lan
<snip>Where the XXX does this "lan" come from and how do I change it?
Thanks a lot!
Daniel
