nixos/nfs: Fix dependency ordering
This commit is contained in:
parent
1716c12b54
commit
2b06a92c2a
@ -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
|
||||
|
@ -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" ];
|
||||
|
||||
|
@ -38,7 +38,7 @@ in
|
||||
testScript =
|
||||
''
|
||||
$server->waitForUnit("nfsd");
|
||||
$server->waitForUnit("network.target");
|
||||
$server->waitForUnit("network-online.target");
|
||||
|
||||
startAll;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user