OpenWrt Forum Archive

Topic: Problem with pppoe - 24 hrs/reconnect

The content of this topic has been archived on 21 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

hi,
i have just upgraded from white russian to kamikaze.
so far the openwrt runs fine.

my dsl-provider does disconnect my line every 24 hours.
i want to have the reconnect controlled my "me" on a fixed time.

on whrite russian i have the following cron-job:

0 6 * * * /sbin/ifdown wan && /sbin/ifup wan

on kamikaze this dont works.
also "ifdown wan && sleep 10 && ifup wan" dont works.
manually "ifdown wan" and then "ifup wan" works!

So - can anyone give me an hint?

regards
Thorsten

...doesn't work ;-)

Did you try the "persist" option? It necessary for pptp to reconnect, I don't know if it works with pppoe.
http://ppp.samba.org/ppp/pppd.html

As stated in wiki http://wiki.openwrt.org/HowtoEnableCron … amikaze%29  it should work ... maybe you should try to confirm that task is realy executed ?  f.e. with something like

0 6 * * * echo test >> /tmp/crontask.tmp && /sbin/ifdown wan && /sbin/ifup wan

if file /tmp/crontask.tmp  will be created, than cron execute task correctly otherwise look why it is not ...

Hi
the problem ist that

/sbin/ifdown wan && /sbin/ifup wan

dont works for me (also from command line)

But it works when i type this commands line per line

/sbin/ifdown wan
/sbin/ifup wan

dont know why "&&" dont works as expected.

regards
thorsten

wiki mentioned earlier describe exactly your case ... command used there is

ifdown wan && sleep 2 && ifup wan

i see only one distinct: removed /sbin

... have no other idea ...

(Last edited by e226329 on 9 Jan 2008, 12:55)

Hi
i found the problem!

# echo 1 && echo 2 && echo 3
1
2
3

but

# echo 1 && ifdown wan && echo 2
1

also

# echo 1 && rmmod rp-pppoe.so && echo 2
1

Looks like a bug in Kamikaze! The commands "ifwan down" and "rmmod rp-pppoe.so" breaks the command execution after "&&".
My work-around is two cron jobs: "ifwan down" and one minute later "ifup wan".

regards
thorsten

The discussion might have continued from here.