Do not run VirtualBox setup under enabled Secure Boot to avoid errors and startup...
authorMichael Prokop <mika@grml.org>
Tue, 15 Sep 2020 19:16:49 +0000 (21:16 +0200)
committerMichael Prokop <mika@grml.org>
Tue, 15 Sep 2020 19:17:27 +0000 (21:17 +0200)
commit14203ccf156430ede6bfc55fb19a142dcf8c7397
treed17019df0f844c61c0d10f940923d7b9e28b77fa
parent8b19d852890fe5aed6e668e29abf9e45e79ec8c2
Do not run VirtualBox setup under enabled Secure Boot to avoid errors and startup delays

The VirtualBox package from upstream isn't signed for usage with Secure
Boot with the Debian kernel.

When booting with Secure Boot enabled, then upstream's vboxdrv.service with
its vboxdrv.sh executes all kind of Secure Boot related magic like:

| /usr/bin/perl -w /usr/share/debconf/frontend /usr/sbin/update-secureboot-policy --new-key

This fails and causes a noticeable delay during bootup.  Therefore skip
execution of VirtualBox setup within our config_virtualbox_setup() when
detecting enabled Secure Boot mode, at least until we've a better solution
for this.

While doing so, move detection of enabled Secure Boot mode into a helper
function to avoid DRY code.

Thanks: Ralf Moll for the bugreport
autoconfig.functions