diff --git a/setup.sh b/setup.sh index d45af03c6..71227581b 100755 --- a/setup.sh +++ b/setup.sh @@ -359,6 +359,12 @@ generate_certificates() ( # update host to trust registry certificate if ! cmp --quiet "$STATEDIR/certs/ca.pem" "$certs_dir/tinkerbell.crt"; then + if [ ! -d "$certs_dir/tinkerbell.crt" ]; then + # The user will be told to create the directory + # in the next block, if copying the certs there + # fails. + mkdir -p "$certs_dir" || true >/dev/null 2>&1 + fi if ! cp "$STATEDIR/certs/ca.pem" "$certs_dir/tinkerbell.crt"; then echo "$ERR please copy $STATEDIR/certs/ca.pem to $certs_dir/tinkerbell.crt" echo "$BLANK and run $0 again:" @@ -442,7 +448,6 @@ check_prerequisites() ( failed=0 check_command docker || failed=1 check_command docker-compose || failed=1 - check_command git || failed=1 check_command ip || failed=1 check_command jq || failed=1