I took a look into the sources of the ControlBlock driver. The same issue that caused the slow shutdown for the PowerBlock also existed there. I have fixed that now.
I have just published a new release of the PowerBlock driver. Besides a logger, and extended configurability, it also fixes the shutdown behaviour such that it only takes (again) about four seconds for a shutdown now:
You need to open the config file with the command
sudo nano /etc/controlblock.cfg
This command ...
If you call
sudo /etc/controlblockconfig.cfg you try to execute whatever is inside that cfg file. And that, in turn, leads to an error.
Does this clear things up?
By the way, you can mark code snippets with this syntax:
You are right. If no power switch is connected, you need to set powerswitchOn to “false” in the config file. That will stop the immediate shutdown after boot.