diff options
author | Daan De Meyer <daan.j.demeyer@gmail.com> | 2023-05-26 17:38:23 +0200 |
---|---|---|
committer | Daan De Meyer <daan.j.demeyer@gmail.com> | 2023-05-31 14:19:25 +0200 |
commit | 4dfb458f42decbfe463ee9bba0a10b0d284f302f (patch) | |
tree | eeeb218b76f169f89f87749f265ac30387b12717 /mkosi.presets/20-final | |
parent | mkosi: Blacklist vmw_vmci to avoid issues with vsock in Github Actions (diff) | |
download | systemd-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-x | mkosi.presets/20-final/mkosi.extra/usr/lib/systemd/mkosi-check-and-shutdown.sh | 2 |
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 |