diff options
author | Sandro <sandro.jaeckel@gmail.com> | 2022-12-21 20:35:50 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-21 20:35:50 +0100 |
commit | 5b450caa5ebeacbe751126e59e28e264b88256ee (patch) | |
tree | d142c131f529a94ea8a329e8d9eeeb207b24b735 /nixos | |
parent | 150dfc3391044a8716a27286e3c217a1dd474bc6 (diff) | |
parent | e217979fc7696486cd6445224ffe8700f18dfe70 (diff) | |
download | nixlib-5b450caa5ebeacbe751126e59e28e264b88256ee.tar nixlib-5b450caa5ebeacbe751126e59e28e264b88256ee.tar.gz nixlib-5b450caa5ebeacbe751126e59e28e264b88256ee.tar.bz2 nixlib-5b450caa5ebeacbe751126e59e28e264b88256ee.tar.lz nixlib-5b450caa5ebeacbe751126e59e28e264b88256ee.tar.xz nixlib-5b450caa5ebeacbe751126e59e28e264b88256ee.tar.zst nixlib-5b450caa5ebeacbe751126e59e28e264b88256ee.zip |
Merge pull request #202245 from tylerjl/rpcbind-tmpfiles-dependency
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/services/networking/rpcbind.nix | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/nixos/modules/services/networking/rpcbind.nix b/nixos/modules/services/networking/rpcbind.nix index aa04214debb0..60e78dfec51b 100644 --- a/nixos/modules/services/networking/rpcbind.nix +++ b/nixos/modules/services/networking/rpcbind.nix @@ -35,6 +35,16 @@ with lib; systemd.services.rpcbind = { wantedBy = [ "multi-user.target" ]; + # rpcbind performs a check for /var/run/rpcbind.lock at startup + # and will crash if /var/run isn't present. In the stock NixOS + # var.conf tmpfiles configuration file, /var/run is symlinked to + # /run, so rpcbind can enter a race condition in which /var/run + # isn't symlinked yet but tries to interact with the path, so + # controlling the order explicitly here ensures that rpcbind can + # start successfully. The `wants` instead of `requires` should + # avoid creating a strict/brittle dependency. + wants = [ "systemd-tmpfiles-setup.service" ]; + after = [ "systemd-tmpfiles-setup.service" ]; }; users.users.rpc = { |