summaryrefslogtreecommitdiffstats
path: root/mkosi.presets/20-final
diff options
context:
space:
mode:
authorDaan De Meyer <daan.j.demeyer@gmail.com>2023-05-26 17:38:23 +0200
committerDaan De Meyer <daan.j.demeyer@gmail.com>2023-05-31 14:19:25 +0200
commit4dfb458f42decbfe463ee9bba0a10b0d284f302f (patch)
treeeeeb218b76f169f89f87749f265ac30387b12717 /mkosi.presets/20-final
parentmkosi: Blacklist vmw_vmci to avoid issues with vsock in Github Actions (diff)
downloadsystemd-4dfb458f42decbfe463ee9bba0a10b0d284f302f.tar.xz
systemd-4dfb458f42decbfe463ee9bba0a10b0d284f302f.zip
mkosi: Use proper check to detect whether we're in a VM
Diffstat (limited to 'mkosi.presets/20-final')
-rwxr-xr-xmkosi.presets/20-final/mkosi.extra/usr/lib/systemd/mkosi-check-and-shutdown.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/mkosi.presets/20-final/mkosi.extra/usr/lib/systemd/mkosi-check-and-shutdown.sh b/mkosi.presets/20-final/mkosi.extra/usr/lib/systemd/mkosi-check-and-shutdown.sh
index ae1385b98b..9624bc486c 100755
--- a/mkosi.presets/20-final/mkosi.extra/usr/lib/systemd/mkosi-check-and-shutdown.sh
+++ b/mkosi.presets/20-final/mkosi.extra/usr/lib/systemd/mkosi-check-and-shutdown.sh
@@ -4,7 +4,7 @@
systemctl --failed --no-legend | tee /failed-services
# Check that secure boot keys were properly enrolled.
-if [[ -d /sys/firmware/efi/efivars/ ]]; then
+if ! systemd-detect-virt --container; then
cmp /sys/firmware/efi/efivars/SecureBoot-8be4df61-93ca-11d2-aa0d-00e098032b8c <(printf '\6\0\0\0\1')
cmp /sys/firmware/efi/efivars/SetupMode-8be4df61-93ca-11d2-aa0d-00e098032b8c <(printf '\6\0\0\0\0')
grep -q this_should_be_here /proc/cmdline