Hi and sorry my english.
If you use only adsl account (PPPoE, PPTP os , you can dial this script:
Code:
killall pppd >/dev/null 2>&1
pppd file /tmp/ppp/options.wan0 >/dev/null 2>&1
and disconnect
Code:
killall pppd >/dev/null 2>&1
If you use two adsl account, create two new file (/opt/etc/options.wan1 and /opt/etc/options.wan2) based on /tmp/ppp/options.wan0 (and change adsl account name and password).
You can change adsl connection, if you use two script:
/opt/dial_adsl1
Code:
killall pppd >/dev/null 2>&1
cp /opt/etc/options.wan1 /tmp/ppp/options.wan0
pppd file /tmp/ppp/options.wan0 >/dev/null 2>&1
/opt/dial_adsl2
Code:
killall pppd >/dev/null 2>&1
cp /opt/etc/options.wan2 /tmp/ppp/options.wan0
pppd file /tmp/ppp/options.wan0 >/dev/null 2>&1
and the changes you can automate with cron.
If hangup the line, the router can reconnect with adsl1 (or adsl2) definitions.
If your isp use a automatic_ip (dhcp) or L2TP, the router use "udhcpc" program to communicate with your isp (not dial up).
(use this command
Code:
udhcpc -i eth1 -p /var/run/udhcpc0.pid -s /tmp/udhcpc &
I don't know, whitch program can to connect/to disconnect the wan adapter (send a Connect/Disconnect signal to udhcpc), my isp support only pppoe connection. If your isp combine pppoe and dhcp type connection, you must set connection type in nvram (get info: nvram get wan_proto_t )
if pppoe: "PPPoE"
if dhcp: "Automatic IP"
If you use dhcp (or BigPond) connection, I find a tester for testing connect/disconnect function
George