bootctl: make 'random-seed' handle inability to write system token EFI variable gracefully

Apparently some firmwares don't allow us to write this token, and refuse
it with EINVAL. We should normally consider that a fatal error, but not
really in the case of "bootctl random-seed" when called from the
systemd-boot-system-token.service since it's called as "best effort"
service after boot on various systems, and hence we shouldn't fail
loudly.

Similar, when we cannot find the ESP don't fail either, since there are
systems (arch install ISOs) that carry a boot loader capable of the
random seed logic but don't mount it after boot.

Fixes: #13603
This commit is contained in:
Lennart Poettering
2019-11-21 19:55:17 +01:00
committed by Zbigniew Jędrzejewski-Szmek
parent 9389a3cdc8
commit 351de38e4b
3 changed files with 35 additions and 5 deletions
+6
View File
@@ -183,6 +183,12 @@
<listitem><para>Do not touch the firmware's boot loader list stored in EFI variables.</para></listitem>
</varlistentry>
<varlistentry>
<term><option>--graceful</option></term>
<listitem><para>Ignore failure when the EFI System Partition cannot be found, or when EFI variables
cannot be written. Currently only applies to random seed operations.</para></listitem>
</varlistentry>
<xi:include href="standard-options.xml" xpointer="no-pager"/>
<xi:include href="standard-options.xml" xpointer="help"/>
<xi:include href="standard-options.xml" xpointer="version"/>