Hi,
I set sleep to 10 sec => sleep(10) and retries to 30. After debugging with wireshark and dmesg it would work also with 15 retries.
My NAS is a Buffalo Linstation Pro DUO.
It has autopoweroff if no wol signal is received within 3min. It starts from standby if a wol signal is received.
Start up from standby takes about 90sec.
I worte a skript for the rpi that sends wol signal every 120sec but it seems that the first wol signal is not send after boot rpi.
I insert "sysCmd('wol xx:xx:xx:xx:xx'); to the rune_SY_wrk. With wireshark I can see the first wol signal from rpi about 40sec after switch on rpi. At this point the NAS starts and takes 90 sec.
With dmesg I see the first try to mount the NAS is after 37sec. After 6 retries (ca. 190 sec) the NAS is Up and mounted. The Time between two retries is 19 sec. It should be 10

but I don't know.
My programming knowledge is low and limited to C.
Most of my changes with other coding language is like "try & error"

MeiT