summaryrefslogtreecommitdiff
path: root/scripts/check-qemu-install
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2025-03-21 08:37:34 +0100
committerGitHub <noreply@github.com>2025-03-21 08:37:34 +0100
commitd552f7f8c38d7ad3bd28d9019a58b57e41b07f0b (patch)
treefc2421034e941871e0d233c52bda6992f3e1acc2 /scripts/check-qemu-install
parent750951606bbbbdc7c1e21d36a8af8e8ba1b98db9 (diff)
parent96f1844557950055aa8f9cd97bd95a6a0b1761b9 (diff)
downloadvyos-build-d552f7f8c38d7ad3bd28d9019a58b57e41b07f0b.tar.gz
vyos-build-d552f7f8c38d7ad3bd28d9019a58b57e41b07f0b.zip
Merge pull request #930 from c-po/T861-secure-boot
T861: minor improvements to secure-boot certificate handling
Diffstat (limited to 'scripts/check-qemu-install')
-rwxr-xr-xscripts/check-qemu-install12
1 files changed, 11 insertions, 1 deletions
diff --git a/scripts/check-qemu-install b/scripts/check-qemu-install
index 551d1e7e..ab6e1b1f 100755
--- a/scripts/check-qemu-install
+++ b/scripts/check-qemu-install
@@ -399,6 +399,16 @@ try:
loginVM(c, log)
#################################################
+ # Check for no private key contents within the image
+ #################################################
+ msg = 'Found private key - bailing out'
+ c.sendline(f'if sudo grep -rq "BEGIN PRIVATE KEY" /var/lib/shim-signed/mok; then echo {msg}; exit 1; fi')
+ tmp = c.expect([f'\n{msg}', op_mode_prompt])
+ if tmp == 0:
+ log.error(msg)
+ exit(1)
+
+ #################################################
# Installing into VyOS system
#################################################
log.info('Starting installer')
@@ -879,7 +889,7 @@ except pexpect.exceptions.ExceptionPexpect:
EXCEPTION = 1
except Exception:
- log.error('Unknown error occured while VyOS!')
+ log.error('Unknown error occured!')
traceback.print_exc()
EXCEPTION = 1