nixos/nfs: Fix dependency ordering

This commit is contained in:
William A. Kennington III 2014-12-01 17:17:46 -08:00
parent 1716c12b54
commit 2b06a92c2a
3 changed files with 11 additions and 4 deletions

View File

@ -947,6 +947,11 @@ in
systemd.targets.network-online.after = [ "ip-up.target" ];
systemd.targets.remote-fs-pre = {
wantedBy = [ "remote-fs.target" ];
before = [ "remote-fs.target" ];
};
systemd.units =
mapAttrs' (n: v: nameValuePair "${n}.target" (targetToUnit n v)) cfg.targets
// mapAttrs' (n: v: nameValuePair "${n}.service" (serviceToUnit n v)) cfg.services

View File

@ -73,9 +73,10 @@ in
path = [ pkgs.nfsUtils pkgs.sysvtools pkgs.utillinux ];
wantedBy = [ "multi-user.target" ];
wantedBy = [ "remote-fs-pre.target" ];
before = [ "remote-fs-pre.target" ];
requires = [ "basic.target" "rpcbind.service" ];
after = [ "basic.target" "rpcbind.service" "network.target" ];
after = [ "basic.target" "rpcbind.service" ];
unitConfig.DefaultDependencies = false; # don't stop during shutdown
@ -99,7 +100,8 @@ in
path = [ pkgs.sysvtools pkgs.utillinux ];
wantedBy = [ "multi-user.target" ];
wantedBy = [ "remote-fs-pre.target" ];
before = [ "remote-fs-pre.target" ];
requires = [ "rpcbind.service" ];
after = [ "rpcbind.service" ];

View File

@ -38,7 +38,7 @@ in
testScript =
''
$server->waitForUnit("nfsd");
$server->waitForUnit("network.target");
$server->waitForUnit("network-online.target");
startAll;