diff options
author | hyperfekt <git@hyperfekt.net> | 2021-05-25 23:52:46 +0200 |
---|---|---|
committer | hyperfekt <git@hyperfekt.net> | 2021-05-30 03:43:50 +0200 |
commit | 92cbe52e19c42ba606b040bee5933dd35b0e8267 (patch) | |
tree | 3b2f618ecf4fabf229142fe37ca0c22213d27703 /nixos | |
parent | 2c3cbef68d2040346d6e08f8e2bd8d64c230f6fc (diff) | |
download | nixpkgs-92cbe52e19c42ba606b040bee5933dd35b0e8267.tar nixpkgs-92cbe52e19c42ba606b040bee5933dd35b0e8267.tar.gz nixpkgs-92cbe52e19c42ba606b040bee5933dd35b0e8267.tar.bz2 nixpkgs-92cbe52e19c42ba606b040bee5933dd35b0e8267.tar.lz nixpkgs-92cbe52e19c42ba606b040bee5933dd35b0e8267.tar.xz nixpkgs-92cbe52e19c42ba606b040bee5933dd35b0e8267.tar.zst nixpkgs-92cbe52e19c42ba606b040bee5933dd35b0e8267.zip |
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.
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/tasks/filesystems.nix | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/nixos/modules/tasks/filesystems.nix b/nixos/modules/tasks/filesystems.nix index 065d6cc95d1..330facdca63 100644 --- a/nixos/modules/tasks/filesystems.nix +++ b/nixos/modules/tasks/filesystems.nix @@ -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" ]; }; |