Hi Subzero,
thank you so, so much for this great enhancement of the encryption plugin. This was exactly I was looking for the last months. I really like to have my data partitions encrypted and I used the "regular" plugin for this task. But I always had problems after restarting my nas getting all the services, that rely on the decrypted data partition, to work again (especially docker). Normally I needed to perform several service restarts and plugin activating and deactivating.
With your modifications it now works as it should. After restarting everything is "on hold" until I decrypt the luks paratition with your script.
I only had few problems that I want to share with you as feedback:
1. I use a network bond on my NAS. With installing your plugin, the network was not available in the "before-decrypt" stage. I needed to create an dependency for the before-decrypt target that points to "networking.service", to make sure, my bond is online.
2. When running your script "omv-luks-start" everything works, but I get a warning that a dependency for mount-luks failed. This seems to be comsetic to me, because everything is decrypted
3. I needed to Implement an delay in the unit-file for the docker service, as it seems that docker started to quickly, before everything was mounted and it was hit and miss whether or not docker was startet correctly. An 5 second delay works good for me.
Just wanted to let you know how happy I am about your contribution.
Cheers
Michael