Commit 54ed23d2 authored by ssrq's avatar ssrq

[type/__easy_rsa_{ca,cert}] Use ./easyrsa instead of script in /usr/share

parent 77b936b9
......@@ -33,18 +33,6 @@ fi
state_is=$(cat "${__object:?}/explorer/state")
easyrsa_executable=
os=$(cat "${__global:?}/explorer/os")
case ${os}
in
(debian|devuan)
easyrsa_executable='/usr/share/easy-rsa/easyrsa'
;;
(*)
exit 1 # fail, OS whitelist should be in manifest
;;
esac
# Terminate early if state is "present"
test "${state_is}" != 'present' || exit 0
......@@ -73,6 +61,5 @@ then
fi
printf 'cd %s\n' "$(quote "${base_dir}")"
printf '%s --pki-dir=%s --vars=%s --req-cn=%s %s --batch build-ca nopass\n' \
"${easyrsa_executable}" "$(quote "${base_dir}/pki")" \
"$(quote "${base_dir}/vars")" "$(quote "${common_name}")" "${opt_params# }"
printf './easyrsa --pki-dir=%s --vars=%s --req-cn=%s %s --batch build-ca nopass\n' \
"$(quote "${base_dir}/pki")" "$(quote "${base_dir}/vars")" "$(quote "${common_name}")" "${opt_params# }"
......@@ -33,19 +33,6 @@ else
common_name=${__object_id:?}
fi
# Set the executable for easy-rsa
easyrsa_executable=
os=$(cat "${__global:?}/explorer/os")
case ${os}
in
(debian|devuan)
easyrsa_executable='/usr/share/easy-rsa/easyrsa'
;;
(*)
exit 1 # fail, OS whitelist should be in manifest
;;
esac
# Check validity of the supplied parameters
# shellcheck source=/dev/null
. "${__type:?}/files/check_parameter_validity.sh"
......@@ -77,7 +64,7 @@ if test "${state_is}" != 'present'
then
printf 'cd %s\n' "$(quote "${base_dir}")"
easyrsa_cmd="${easyrsa_executable} --pki-dir=$(quote "${base_dir}/pki") --vars=$(quote "${base_dir}/vars") --batch"
easyrsa_cmd="./easyrsa --pki-dir=$(quote "${base_dir}/pki") --vars=$(quote "${base_dir}/vars") --batch"
printf '%s --req-cn=%s %s gen-req %s nopass\n' \
"${easyrsa_cmd}" "$(quote "${common_name}")" "${req_options# }" "$(quote "${__object_id:?}")"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment