On my system, an x86 DSM (Linux-based) Synology NAS, running the script results in an error:
Sending magic packet.../volume1/homes/wol/wol.sh: line 68: nc: command not found
I installed netcat using Entware, and confirmed the binary was in a folder included in PATH, however the nc alias was not created. I did so with alias nc=netcat but the script was still unable to invoke nc.
To resolve this I amended the script to explicitly reference the netcat binary.
After doing this, I received a different issue - sending a packet worked, but in what appears to be this bug related to netcat hanging indefinitely in UDP mode, The prompt showed Sending magic packet... until I sent SIGINT, at which point it showed the success message and exited. The suggested -w0 command doesn't work on this flavour of netcat ("GNU netcat 0.7.1").
To resolve this issue, I amended the script to use -cu instead of -w1 and now the script exits correctly upon completion.
On my system, an x86 DSM (Linux-based) Synology NAS, running the script results in an error:
Sending magic packet.../volume1/homes/wol/wol.sh: line 68: nc: command not found
I installed
netcat
using Entware, and confirmed the binary was in a folder included in PATH, however thenc
alias was not created. I did so withalias nc=netcat
but the script was still unable to invoke nc.To resolve this I amended the script to explicitly reference the
netcat
binary.After doing this, I received a different issue - sending a packet worked, but in what appears to be this bug related to netcat hanging indefinitely in UDP mode, The prompt showed
Sending magic packet...
until I sent SIGINT, at which point it showed the success message and exited. The suggested-w0
command doesn't work on this flavour of netcat ("GNU netcat 0.7.1").To resolve this issue, I amended the script to use
-cu
instead of-w1
and now the script exits correctly upon completion.