Hi,
What is wrong with the folowing script ("S30mymetwork" in init.d)?
When I run the script, the route is not added (last line), when I type it manually on the console the route well is added (visible via route -n)
The script is:
#!/bin/sh
set -x
. /etc/config/network
WAN_IP="$wifi_ipaddr"
wlanconfig ath0 destroy
wlanconfig ath0 create wlandev wifi0 wlanmode sta
echo WAN_IP $WAN_IP
ifconfig ath0 $WAN_IP
iwconfig ath0 essid "test"
ifconfig ath0 up
route add default gw 192.168.1.1
The command I type on the console:
>route add default gw 192.168.1.1
Any idea, can the default route be deleted by dnsmasq, udhcpc.... ?