@Bennor
First:
At least on MY single-drive My Cloud with the 2,n firmware, the “halt” command fully shuts down the device. Period. No lights. No network lights. No apparent disk activity.
The clincher:
When you use the “shutdown.sh” script, it appears to shut the system down, but does not formally un-mount the drives, completely turn off power, etc. The result is that when you restart and log into the Dashboard, (what I cal the webmin page), you get a red alert claiming that “power was lost” and that it is “checking the file-system’s consistency”.
When you use the HALT command, the lights flash, the system goes to a totally power-off state, (the network lights are not running), and the filesystems are formally unmounted. This is shown by the fact that - when the system is re-started and you then login to the Dashboard - you do NOT get a “Power Failure” message, you get a “The system is booting. Please wait” message, and there is no alert in the alerts page for a power failure.
I suspect that the “shutdown” script does not really shut down the device, but rather puts it to sleep with the network and a basic level of functionality active so that it can “wake on lan”. By comparison, the “halt” command appears to completely shut the device down to a completely powered off state.
Second:
I do not remember where the actual path to the “halt” binary is. However it is in the system’s path, so that it will run regardless of where you might be in a SSH session. I do remember it is somewhere around the " /usr/local/modules/" area in the filesystem. Regrettably, I may not have the time to go find it for you.
I have not tried using something like Plink, but if Plink can send commands to a SSH-like session, it should work automagically as it is in the path. YMMV.
My investigations within the " /usr/local/modules/" path disclosed that there IS programmatic support for Wake On Lan, it just appears to not be implemented properly. Again, like the (hidden) halt command, I suspect it is just a matter of finding out how to use it. (Note that my investigations are being done with a single-drive, version 2.n My Cloud.)
It’s stuff like this that makes me wonder if the Dev team from WD were hired away from M$, or went to the “M$ School of Programming Excellence”. Likewise the QA department.
In all the SQA assignments I have had in the past, releasing with what are obvious high-severity bugs like these would have gotten me tossed out the door on the tip of the manager’s #9, steel-tipped boot!
The ray of sunshine in these clouds is the existence of fora like these, and people like us who are willing to take the time and research these issues with a view toward solving - or mitigating - them.
For which I am gratefully and humbly thankful.
Jim “JR”