Commit e321a780 authored by ssrq's avatar ssrq

[type/__easy_rsa_ca] "Handle" empty parameter files

parent 3bbc45a4
......@@ -22,7 +22,7 @@
base_dir=$(cat "${__object:?}/parameter/dir")
if test -f "${__object:?}/parameter/common-name"
if test -s "${__object:?}/parameter/common-name"
then
common_name=$(cat "${__object:?}/parameter/common-name")
else
......@@ -50,7 +50,7 @@ opt_params=
# loop through mapping file
while read param_name option_name
do
if test -f "${__object:?}/parameter/${param_name}"
if test -s "${__object:?}/parameter/${param_name}"
then
value=$(head -n 1 "${__object:?}/parameter/${param_name}")
opt_params="${opt_params} --${option_name}=\"${value}\""
......
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