mirror of
https://gitlab.archlinux.org/tpowa/archboot.git
synced 2024-09-20 03:50:37 +02:00
fix secure boot keys script to be run on any system
This commit is contained in:
parent
3ac53fe470
commit
4fe377fc4a
1 changed files with 5 additions and 2 deletions
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
# created by Tobias Powalowski <tpowa@archlinux.org>
|
# created by Tobias Powalowski <tpowa@archlinux.org>
|
||||||
. /usr/lib/archboot/installer/common.sh
|
. /usr/lib/archboot/common.sh
|
||||||
|
|
||||||
usage () {
|
usage () {
|
||||||
echo -e "\033[1mGenerate Secure Boot keys,MOK files and backup existing keys:\033[0m"
|
echo -e "\033[1mGenerate Secure Boot keys,MOK files and backup existing keys:\033[0m"
|
||||||
|
@ -38,6 +38,9 @@ fi
|
||||||
|
|
||||||
_root_check
|
_root_check
|
||||||
|
|
||||||
|
[[ -e /usr/bin/mkkeys.sh ]] && MKKEYS="mkkeys.sh"
|
||||||
|
[[ -e /usr/bin/archboot-mkkeys.sh ]] && MKKEYS="archboot-mkkeys.sh"
|
||||||
|
|
||||||
if [[ -n "${_DIR}" ]]; then
|
if [[ -n "${_DIR}" ]]; then
|
||||||
[[ ! -d "${_DIR}" ]] && mkdir -p "${_DIR}"
|
[[ ! -d "${_DIR}" ]] && mkdir -p "${_DIR}"
|
||||||
cd "${_DIR}" || exit 1
|
cd "${_DIR}" || exit 1
|
||||||
|
@ -50,7 +53,7 @@ if [[ -n "${_DIR}" ]]; then
|
||||||
cd BACKUP || exit 1; mokutil --export; cd .. || exit 1
|
cd BACKUP || exit 1; mokutil --export; cd .. || exit 1
|
||||||
echo "Generating Keys in $_DIR"
|
echo "Generating Keys in $_DIR"
|
||||||
# add mkkeys.sh
|
# add mkkeys.sh
|
||||||
mkkeys.sh <<EOF
|
${MKKEYS} <<EOF
|
||||||
${NAME}
|
${NAME}
|
||||||
EOF
|
EOF
|
||||||
# download MS Certificates, else EFI might get broken!
|
# download MS Certificates, else EFI might get broken!
|
||||||
|
|
Loading…
Reference in a new issue