mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-09-11 15:08:33 +01:00
* portmap: add a postStart action that ensures that portmap is
actually listening. Otherwise we have a race condition during boot where statd's start can be delayed, causing NFSv3 mounting to fail. svn path=/nixos/trunk/; revision=33171
This commit is contained in:
parent
5a36c25e9f
commit
823471a100
|
@ -73,13 +73,22 @@ in
|
|||
|
||||
daemonType = "fork";
|
||||
|
||||
path = [ portmap pkgs.netcat ];
|
||||
|
||||
exec =
|
||||
''
|
||||
${portmap}/sbin/portmap \
|
||||
portmap \
|
||||
${optionalString (config.services.portmap.chroot != "")
|
||||
"-t '${config.services.portmap.chroot}'"} \
|
||||
${if config.services.portmap.verbose then "-v" else ""}
|
||||
'';
|
||||
|
||||
postStart =
|
||||
''
|
||||
# Portmap forks into the background before it starts
|
||||
# listening, so wait until its ready.
|
||||
while ! nc -z localhost 111; do sleep 1; done
|
||||
'';
|
||||
};
|
||||
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue