1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-24 14:41:17 +00:00
nixpkgs/pkgs/tools/networking/easyrsa/fix-paths.patch
2016-01-10 07:28:55 +03:00

34 lines
1.3 KiB
Diff

diff --git a/easyrsa3/easyrsa b/easyrsa3/easyrsa
index 6fec288..210648a 100755
--- a/easyrsa3/easyrsa
+++ b/easyrsa3/easyrsa
@@ -1003,7 +1003,7 @@ Note: using Easy-RSA configuration from: $vars"
# Set defaults, preferring existing env-vars if present
set_var EASYRSA "$PWD"
- set_var EASYRSA_OPENSSL openssl
+ set_var EASYRSA_OPENSSL "@openssl@"
set_var EASYRSA_PKI "$EASYRSA/pki"
set_var EASYRSA_DN cn_only
set_var EASYRSA_REQ_COUNTRY "US"
@@ -1030,13 +1030,17 @@ Note: using Easy-RSA configuration from: $vars"
# Detect openssl config, preferring EASYRSA_PKI over EASYRSA
if [ -f "$EASYRSA_PKI/openssl-1.0.cnf" ]; then
set_var EASYRSA_SSL_CONF "$EASYRSA_PKI/openssl-1.0.cnf"
- else set_var EASYRSA_SSL_CONF "$EASYRSA/openssl-1.0.cnf"
+ elif [ -f "$EASYRSA/openssl-1.0.cnf" ]; then
+ set_var EASYRSA_SSL_CONF "$EASYRSA/openssl-1.0.cnf"
+ else set_var EASYRSA_SSL_CONF "@out@/share/easyrsa/openssl-1.0.cnf"
fi
# Same as above for the x509-types extensions dir
if [ -d "$EASYRSA_PKI/x509-types" ]; then
set_var EASYRSA_EXT_DIR "$EASYRSA_PKI/x509-types"
- else set_var EASYRSA_EXT_DIR "$EASYRSA/x509-types"
+ elif [ -d "$EASYRSA/x509-types" ]; then
+ set_var EASYRSA_EXT_DIR "$EASYRSA/x509-types"
+ else set_var EASYRSA_EXT_DIR "@out@/share/easyrsa/x509-types"
fi
# EASYRSA_ALGO_PARAMS must be set depending on selected algo