Do /etc/persistent/rc.prestart přidat
# Add options for dnsmasq. if [ "`grep added /etc/dnsmasq.eth0.conf`" = "" ] ; then cat /etc/persistent/dnsmasq.eth0.conf >> /etc/dnsmasq.eth0.conf fi
A založit soubor /etc/persistent/dnsmasq.eth0.conf do kterého přidat řádky se statickými záznamy
# added dhcp-host=<mac-adresa>,<ip-adresa>,<jméno,volitelné>
např:
dhcp-host=b8:27:eb:7a:f6:a4,10.10.1.10,rpi
A uložit persistentní storage, aby přežil i restart
cfgmtd -p /etc -w
A restartovat…
Zdroj: http://forum.ubnt.com/showthread.php?p=111408#post111408 a http://forum.ubnt.com/archive/index.php/t-37271.html
Je třeba přidat localhost do resolveru přidáním do /etc/persistent/rc.prestart
# Add dnsmasq to router resolver. (Wait for resolv.conf to be written by ip-up.) if [ "`grep 127.0.0.1 /etc/resolv.conf`" = "" ] ; then { sleep 5 ; echo "nameserver 127.0.0.1" >> /etc/resolv.conf ; } & fi
Uložit změněné persistent storage:
cfgmtd -p /etc -w
A restartovat…
/etc/persistent/dnsmasq.eth0.conf
# added dhcp-host=b8:27:eb:7a:f6:a4,10.10.1.10,rpi dhcp-host=00:02:72:6d:3c:92,10.10.1.15,obyvak dhcp-host=00:23:14:ec:2b:c0,10.10.1.20,e6410 domain=sob.uam.local domain-needed bogus-priv expand-hosts dhcp-authoritative address=/data.test/10.10.1.10 address=/link.smartscreen.live.com/link.live.net/95.168.208.242 server=/uam.local/172.17.2.234
/etc/persistent/rc.prestart
# Add options for dnsmasq. if [ "`grep added /etc/dnsmasq.eth0.conf`" = "" ] ; then cat /etc/persistent/dnsmasq.eth0.conf >> /etc/dnsmasq.eth0.conf fi # Add dnsmasq to router resolver. (Wait for resolv.conf to be written by ip-up.) if [ "`grep 127.0.0.1 /etc/resolv.conf`" = "" ] ; then { sleep 5 ; echo "nameserver 127.0.0.1" >> /etc/resolv.conf ; } & fi