turris-cagen: more granural locking
Right now it locks by CA name. It should lock by locked by CA dirname (slugified).
Problem: Netboot uses cagen to generate CA for the client and the new ca is always called remote. e.g.
CA_DIR=transfering/0000000D30001605 /tmp/cagen.sh new_ca remote gen_ca gen_server turris gen_client 0000000A00000214-0000000D30001605
This will lock all
remote CAs. =>
/etc/ssl/remote CA and
/srv/turris-neboot/clients/transfering/* CAs can't be modified while the script is running, although it can safely run in parellel.