* 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";
|
daemonType = "fork";
|
||||||
|
|
||||||
|
path = [ portmap pkgs.netcat ];
|
||||||
|
|
||||||
exec =
|
exec =
|
||||||
''
|
''
|
||||||
${portmap}/sbin/portmap \
|
portmap \
|
||||||
${optionalString (config.services.portmap.chroot != "")
|
${optionalString (config.services.portmap.chroot != "")
|
||||||
"-t '${config.services.portmap.chroot}'"} \
|
"-t '${config.services.portmap.chroot}'"} \
|
||||||
${if config.services.portmap.verbose then "-v" else ""}
|
${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…
x
Reference in New Issue
Block a user