OpenVPN / easy-rsa

easy-rsa - Simple shell based CA utility
Other
4.07k stars 1.2k forks source link

init-pki should remove contents of $EASYRSA_PKI, not $EASYRSA_PKI itself #178

Closed draeath closed 2 years ago

draeath commented 6 years ago

I am wrapping easyrsa in a docker container, and am running into an issue - i want to mount $EASYRSA_PKI from the host OS, but init-pki falls over when it can't delete the directory inside the container.

It would be better if init-pki cleaned out the filesystem objects within the directory, instead of deleting the directory itself.

This would also serve better when the directory is some other kind of mount (nfs, veracrypt, etc) as these would run into the same problem.

I am working around it by nesting a directory deeper in the mount, but not requiring this would be a bit more elegant.

draeath commented 6 years ago

I do realize there is no requirement to run this command :)

SnijderC commented 6 years ago

pki is also an optional location for the vars file it would be nice if it wouldn't be removed on pki-init too if present.

ecrist commented 6 years ago

Maybe it would be best to add an option, like --keep-root to leave vars file and the PKI root path in place?

TinCanTech commented 2 years ago

Closed via https://github.com/OpenVPN/easy-rsa/commit/14a29f9fca2128da4a17e478fa04d7ab17d14074

Default is set to hard