diff --git a/sbin/attest-enroll b/sbin/attest-enroll index 59e7f92b..5b9bfe61 100755 --- a/sbin/attest-enroll +++ b/sbin/attest-enroll @@ -27,6 +27,9 @@ if [[ -s $TOP/lib/safeboot/functions.sh ]]; then elif [[ -s $TOP/functions.sh ]]; then # shellcheck source=functions.sh . "$TOP/functions.sh" +elif [[ -s /etc/safeboot/functions.sh ]]; then + # shellcheck source=functions.sh + . /etc/safeboot/functions.sh else echo "Unable to find Safeboot function library" 1>&2 exit 1 diff --git a/sbin/gencert b/sbin/gencert index 0764d1f9..5426a6ee 100755 --- a/sbin/gencert +++ b/sbin/gencert @@ -15,6 +15,9 @@ if [[ -s $TOP/lib/safeboot/functions.sh ]]; then elif [[ -s $TOP/functions.sh ]]; then # shellcheck disable=SC1090 source=functions.sh . "$TOP/functions.sh" +elif [[ -s /etc/safeboot/functions.sh ]]; then + # shellcheck source=functions.sh + . /etc/safeboot/functions.sh else echo "Unable to find Safeboot function library" 1>&2 exit 1 diff --git a/sbin/genkeytab b/sbin/genkeytab index 483f23f9..f1846e17 100755 --- a/sbin/genkeytab +++ b/sbin/genkeytab @@ -15,6 +15,9 @@ if [[ -s $TOP/lib/safeboot/functions.sh ]]; then elif [[ -s $TOP/functions.sh ]]; then # shellcheck disable=SC1090 source=functions.sh . "$TOP/functions.sh" +elif [[ -s /etc/safeboot/functions.sh ]]; then + # shellcheck source=functions.sh + . /etc/safeboot/functions.sh else echo "Unable to find Safeboot function library" 1>&2 exit 1 diff --git a/sbin/getkeytab b/sbin/getkeytab index 06754c90..99ca201d 100755 --- a/sbin/getkeytab +++ b/sbin/getkeytab @@ -35,6 +35,9 @@ if [[ -s $TOP/lib/safeboot/functions.sh ]]; then elif [[ -s $TOP/functions.sh ]]; then # shellcheck disable=SC1090 source=functions.sh . "$TOP/functions.sh" +elif [[ -s /etc/safeboot/functions.sh ]]; then + # shellcheck source=functions.sh + . /etc/safeboot/functions.sh else echo "Unable to find Safeboot function library" 1>&2 exit 1 diff --git a/sbin/safeboot b/sbin/safeboot index bbf64ed1..8c5fac0c 100755 --- a/sbin/safeboot +++ b/sbin/safeboot @@ -33,6 +33,9 @@ if [[ -s $TOP/lib/safeboot/functions.sh ]]; then elif [[ -s $TOP/functions.sh ]]; then # shellcheck source=functions.sh . "$TOP/functions.sh" +elif [[ -s /etc/safeboot/functions.sh ]]; then + # shellcheck source=functions.sh + . /etc/safeboot/functions.sh else echo "Unable to find Safeboot function library" 1>&2 exit 1 diff --git a/sbin/tpm2-attest b/sbin/tpm2-attest index 082cbb03..5b1ae461 100755 --- a/sbin/tpm2-attest +++ b/sbin/tpm2-attest @@ -30,6 +30,9 @@ if [[ -s $TOP/lib/safeboot/functions.sh ]]; then elif [[ -s $TOP/functions.sh ]]; then # shellcheck source=functions.sh . "$TOP/functions.sh" +elif [[ -s /etc/safeboot/functions.sh ]]; then + # shellcheck source=functions.sh + . /etc/safeboot/functions.sh else echo "Unable to find Safeboot function library" 1>&2 exit 1 diff --git a/sbin/tpm2-policy b/sbin/tpm2-policy index 221007c7..53457ad2 100755 --- a/sbin/tpm2-policy +++ b/sbin/tpm2-policy @@ -7,17 +7,16 @@ TOP=$(dirname "$BINDIR") if [[ -s $TOP/lib/safeboot/functions.sh ]]; then # shellcheck disable=SC1090 source=functions.sh . "$TOP/lib/safeboot/functions.sh" - functions_sh=$TOP/lib/safeboot/functions.sh elif [[ -s $TOP/functions.sh ]]; then # shellcheck disable=SC1090 source=functions.sh . "$TOP/functions.sh" - functions_sh=$TOP/functions.sh +elif [[ -s /etc/safeboot/functions.sh ]]; then + # shellcheck disable=SC1090 source=functions.sh + . /etc/safeboot/functions.sh else echo "Unable to find Safeboot function library" 1>&2 exit 1 fi -# shellcheck source=functions.sh -. "$functions_sh" set -euo pipefail -o noclobber shopt -s extglob diff --git a/sbin/tpm2-recv b/sbin/tpm2-recv index ec673b4e..8ce0609c 100755 --- a/sbin/tpm2-recv +++ b/sbin/tpm2-recv @@ -10,6 +10,9 @@ if [[ -s $TOP/lib/safeboot/functions.sh ]]; then elif [[ -s $TOP/functions.sh ]]; then # shellcheck disable=SC1090 source=functions.sh . "$TOP/functions.sh" +elif [[ -s /etc/safeboot/functions.sh ]]; then + # shellcheck source=functions.sh + . /etc/safeboot/functions.sh else echo "Unable to find Safeboot function library" 1>&2 exit 1 diff --git a/sbin/tpm2-send b/sbin/tpm2-send index 1579ecd7..952d31b1 100755 --- a/sbin/tpm2-send +++ b/sbin/tpm2-send @@ -10,6 +10,9 @@ if [[ -s $TOP/lib/safeboot/functions.sh ]]; then elif [[ -s $TOP/functions.sh ]]; then # shellcheck disable=SC1090 source=functions.sh . "$TOP/functions.sh" +elif [[ -s /etc/safeboot/functions.sh ]]; then + # shellcheck source=functions.sh + . /etc/safeboot/functions.sh else echo "Unable to find Safeboot function library" 1>&2 exit 1