dns part: this is what i do. sorry if i knew you were actually still going to go through with it, i would've said more.
(TRY THIS /tmp/resolv.conf.auto INSTEAD OF /etc/resolve.conf)
## /usr/share/udhcpc/default.script :: setup_interface() needs this to add DNS from host
[ -n "$dns" ] && {
echo "udhcpc: adding $dns to /tmp/resolv.conf.auto"
> /tmp/resolv.conf.auto
for dns in $dns; do
echo "nameserver $dns" >> /tmp/resolv.conf.auto
done
}
you can put udhcpc in the background with screen
like this (this is the call i use exactly):
screen -d -S udhcpc -m udhcpc -p /var/run/udhcpc-wlan2.pid -f -t 0 -i wlan2 -x hostname:Edimax -C -O 121
this is the command i use for wpa_supplicant
wpad wpa_supplicant -B -P /var/run/wpa_supplicant-wlan2.pid -D nl80211 -i wlan2 -c /etc/config/wpad/sta.conf -C /var/run/wpa_supplicant/
to kill them you can:
kill -9 `cat /var/run/wpa_supplicant-wlan2.pid` && rm -f /var/run/wpa_supplicant-wlan2.pid
kill -9 `cat /var/run/udhcpc-wlan2.pid` && rm -f /var/run/udhcpc-wlan2.pid
also udhcpc can call a separate script instead of default: -s,--script PROG Run PROG at DHCP events (default /usr/share/udhcpc/default.script)
i actually have a bash script to control all of this for another driver (see: rtl8812AU and/or rtl8814AU drivers [whats after ~ on another note ~] and http://i.imgur.com/UVJzJfo.png), it's not finished yet but i've been working on it when i have time.
as for the rest of what you said, i cant be much help. So i am sorry for this, but i hope you have a lovely day!