# dnrd dns cache # add "nameserver " first into /etc/resolv.conf.head # where ip one of: # not kill on if_down (security leak on net/dns change) bind1=127.0.0.242 # strict: fix on every change bind2=127.0.0.42 # ondemand: kill on if_down bind3=127.0.0.142 binds='127.0.0.*42' _dnrd(){ local p c= s= x y { p=$(< /run/dnrd.pid) && c="$(sed -e 's:\x0: :g' /dev/null while read x y; do case "$x" in nameserver)[[ "$y" == $binds ]] && s+=" -a $y" || s+=" -s $y";; esac done