As we all know, network (and USB) stacks need to be disabled before running WHDLoad, and this is usually done in the S:WHDLoad-Startup script.
Previously, I had a line in the script that was simply:
SYS:RexxC/RX 'ADDRESS MIAMI.1 OFFLINE'
This would take Miami offline, but WHDLoad would throw up an error message if Miami wasn't running (obviously the command would fail since the MIAMI.1 port wasn't open).
Having finally learned the correct ARexx command to check for an ARexx port (SHOW()), I revised the command:
SYS:RexxC/RX "IF SHOW(PORTS,MIAMI.1) = 1 THEN ADDRESS MIAMI.1 OFFLINE"
Now WHDLoad will start quietly regardless of whether Miami is open or not. To adapt these for S:WHDLoad-Cleanup, simply replace OFFLINE with ONLINE.
I hope this is helpful to other Miami users!