3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/nixos
aszlig dc31a1ea29
systemd-boot: Unlink loader.conf if it exists
Since systemd version 232 the install subcommand of bootctl opens the
loader.conf with fopen() modes "wxe", where the "e" stands for
exclusive, so the call will fail if the file exists.

For installing the boot loader just once this is fine, but if we're
using NIXOS_INSTALL_BOOTLOADER on a systemd where the bootloader is
already present this will fail.

Exactly this is done within the simpleUefiGummiboot installer test,
where nixos-install is called twice and thus the bootloader is also
installed twice, resulting in an error during the fopen call:

Failed to open loader.conf for writing: File exists

Removing the file prior to calling bootctl should fix this.

I've tested this using the installer.simpleUefiGummiboot test and it now
succeeds.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
Cc: @edolstra, @shlevy, @mic92
Fixes: #22925
2017-02-20 14:54:48 +01:00
..
doc/manual manual: Add link to config section (#22994) 2017-02-20 14:32:49 +01:00
lib nixos/test: Fix escaping for copyFileFromHost 2017-02-17 19:45:49 +01:00
maintainers Create AMIs for ca-central-1 (Canada) 2017-02-19 23:19:07 +01:00
modules systemd-boot: Unlink loader.conf if it exists 2017-02-20 14:54:48 +01:00
tests nixos/tests/taskserver: Add test for manual config 2017-02-17 19:46:01 +01:00
COPYING
default.nix
README
release-combined.nix nixos: drop references to kde4 2017-02-11 14:01:13 -05:00
release-small.nix nixos/release-small.nix: cleanup to use default versions 2017-01-27 15:33:54 +01:00
release.nix pam_oath: require OATH and pam_unix credentials to be valid 2017-02-12 18:27:11 -05:00

*** NixOS ***

NixOS is a Linux distribution based on the purely functional package
management system Nix.  More information can be found at
http://nixos.org/nixos and in the manual in doc/manual.