mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-09-11 15:08:33 +01:00
nixos/filesystems: condition mount-pstore.service on pstore module
systemd's modprobe@.service does not require success so mount-pstore executed despite a non-present pstore module, leading to an error about the /sys/fs/pstore mountpoint not existing on CONFIG_PSTORE=n systems.
This commit is contained in:
parent
2c3cbef68d
commit
92cbe52e19
|
@ -309,6 +309,8 @@ in
|
|||
"mount-pstore" = {
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
# skip on kernels without the pstore module
|
||||
ExecCondition = "${pkgs.kmod}/bin/modprobe -b pstore";
|
||||
ExecStart = "${pkgs.util-linux}/bin/mount -t pstore -o nosuid,noexec,nodev pstore /sys/fs/pstore";
|
||||
ExecStartPost = pkgs.writeShellScript "wait-for-pstore.sh" ''
|
||||
set -eu
|
||||
|
@ -325,8 +327,6 @@ in
|
|||
ConditionVirtualization = "!container";
|
||||
DefaultDependencies = false; # needed to prevent a cycle
|
||||
};
|
||||
after = [ "modprobe@pstore.service" ];
|
||||
requires = [ "modprobe@pstore.service" ];
|
||||
before = [ "systemd-pstore.service" ];
|
||||
wantedBy = [ "systemd-pstore.service" ];
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue