From 4fe377fc4a7468a6035752955d634614e3d3b2b9 Mon Sep 17 00:00:00 2001 From: Tobias Powalowski Date: Thu, 7 Apr 2022 10:51:18 +0200 Subject: [PATCH] fix secure boot keys script to be run on any system --- usr/bin/archboot-secureboot-keys.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/usr/bin/archboot-secureboot-keys.sh b/usr/bin/archboot-secureboot-keys.sh index 887863ba1..0d6da4207 100755 --- a/usr/bin/archboot-secureboot-keys.sh +++ b/usr/bin/archboot-secureboot-keys.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash # created by Tobias Powalowski -. /usr/lib/archboot/installer/common.sh +. /usr/lib/archboot/common.sh usage () { echo -e "\033[1mGenerate Secure Boot keys,MOK files and backup existing keys:\033[0m" @@ -38,6 +38,9 @@ fi _root_check +[[ -e /usr/bin/mkkeys.sh ]] && MKKEYS="mkkeys.sh" +[[ -e /usr/bin/archboot-mkkeys.sh ]] && MKKEYS="archboot-mkkeys.sh" + if [[ -n "${_DIR}" ]]; then [[ ! -d "${_DIR}" ]] && mkdir -p "${_DIR}" cd "${_DIR}" || exit 1 @@ -50,7 +53,7 @@ if [[ -n "${_DIR}" ]]; then cd BACKUP || exit 1; mokutil --export; cd .. || exit 1 echo "Generating Keys in $_DIR" # add mkkeys.sh - mkkeys.sh <