nixpkgs/nixos/modules
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
..
config Merging with upstream 2017-01-29 05:54:01 -06:00
hardware bumblebee service: Fix pmMethod bbswitch check 2017-02-19 22:46:47 -09:00
i18n/input-method nixos/ibus: fix custom panel example 2017-01-24 12:52:39 -06:00
installer fix comments about nixos-hardware-scan 2017-02-18 13:29:47 +01:00
misc programs.wireshark: use setcap wrapper 2017-02-17 15:42:55 +01:00
profiles nixos: update default cases from KDM/KDE4 to SDDM/KDE5 2017-02-09 21:52:00 -05:00
programs Merge pull request #22882 from bjornfor/wireshark 2017-02-20 14:03:30 +01:00
security Merge pull request #22882 from bjornfor/wireshark 2017-02-20 14:03:30 +01:00
services munin service: listen on IPv6 loopback as well (#23012) 2017-02-20 06:13:48 +01:00
system systemd-boot: Unlink loader.conf if it exists 2017-02-20 14:54:48 +01:00
tasks network-interfaces service: fix typo in bonding options 2017-02-18 15:51:52 +01:00
testing kdm: drop service 2017-02-11 13:55:09 -05:00
virtualisation Add ca-central-1 AMIs 2017-02-19 23:46:08 +01:00
module-list.nix Merge pull request #22882 from bjornfor/wireshark 2017-02-20 14:03:30 +01:00
rename.nix nixos: hint about security.setuidOwners/Programs -> security.wrappers 2017-02-15 07:25:33 +01:00