Cant Reboot (while sleep script WOL)

Hi there,

I am running into a problem where I can no longer reboot normally my router... This means, pressing the Luci reboot button or ssh command reboot will have no action on my router.
I can only reboot with command: reboot -f
which generates random memory issues in the next boot...

What is causing it?
I think (cus when I deactivate the issue is no longer there) that the modification that causes this is when I add the Wake up on LAN script (you can find it in the documentation https://wiki.openwrt.org/doc/howto/auto_wake_on_lan ) on the local startup scripts.

And my guesses are that what causes it, is the part of the script that states:
while sleep $INTERVAL; do
wake_up $PORT $TARGET $INTERFACE $MAC;
done

any ideas how I can fix this? or what is actually causing it?

Thanks!

How long is ${INTERVAL} ?

Even at 5 seconds, with a older or inexpensive router, you may be thrashing the CPU and flash.

I'm not sure why they're writing to flash (rather than the RAM-backed "tempfs" on /tmp/) with

LOGFILE="/www/wol/index.html"

How to fix it?

Oh, you mean without getting rid of it, as that fixes it...

Take a look at top or htop and see if it's swamping the CPU.

Try writing to something on /tmp/ instead of the flash file system.

Confirm that it isn't writing every 5 seconds (assuming that is the value of ${INTERVAL})


BTW, the "current" page is https://openwrt.org/docs/guide-user/advanced/auto_wake_on_lan

Sounds pretty crazy that the referenced script logs into flash every five seconds :frowning: But that is just wiki advice...

It might make sense to run the periodic check script from a detached shell, so that it would certainly not block any further script evaluation. E.g like this:
( /path-to-script/script.sh )&

Correct, interval is 5 (as the documentation suggests)...
the router well its not an old one and should be ok ish : Linksys WRT 1900AC
but I do agree that quite CPU/flash consuming...

I will try moving to a higher interval... and put the longs on tmp...
then Ill check to detached shell... (don't know how to do that ^^ at automatic launch)

And hopefully something will work (without getting rid of it :-p )

Well just updating.
I changed the writing interval time, and also the writing location. This did not solve my issue.

The other option of running it in a detached shell did the work.

So solution found! yeiii! (thanks!) although I am not sure if there are any impacts that may come from it.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.