Files
vault/enos/modules/softhsm_install/scripts/find-shared-object.sh
Steven Clark e3f09b8c6d Update licensing across various source files - 1.13 (#24675)
* Fix licensing on various files

* Update packaging to use BUSL-1.1

* Update offset within config_test_helpers.go

 - Fix a test the same way it's been fixed on main/1.15
2024-01-08 12:24:57 -05:00

27 lines
606 B
Bash

#!/bin/bash
## Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: BUSL-1.1
set -e
fail() {
echo "$1" 1>&2
exit 1
}
[[ -z "$RETRY_INTERVAL" ]] && fail "RETRY_INTERVAL env variable has not been set"
[[ -z "$TIMEOUT_SECONDS" ]] && fail "TIMEOUT_SECONDS env variable has not been set"
begin_time=$(date +%s)
end_time=$((begin_time + TIMEOUT_SECONDS))
while [ "$(date +%s)" -lt "$end_time" ]; do
if so=$(sudo find /usr -type f -name libsofthsm2.so -print -quit); then
echo "$so"
exit 0
fi
sleep "$RETRY_INTERVAL"
done
fail "Timed out trying to locate libsofthsm2.so shared object"