* Create /var/lib/nfs/v4recovery.

svn path=/nixos/trunk/; revision=24858
This commit is contained in:
Eelco Dolstra 2010-11-25 16:51:07 +00:00
parent b064f5c80e
commit 636307c62b

View file

@ -133,7 +133,15 @@ in
startOn = "started nfs-kernel-exports and started nfs-kernel-mountd and started nfs-kernel-statd and started portmap";
stopOn = "stopping nfs-kernel-exports";
preStart = "${pkgs.nfsUtils}/sbin/rpc.nfsd ${if cfg.server.hostName != null then "-H ${cfg.server.hostName}" else ""} ${builtins.toString cfg.server.nproc}";
preStart =
''
# Create a state directory required by NFSv4.
mkdir -p /var/lib/nfs/v4recovery
${pkgs.nfsUtils}/sbin/rpc.nfsd \
${if cfg.server.hostName != null then "-H ${cfg.server.hostName}" else ""} \
${builtins.toString cfg.server.nproc}
'';
postStop = "${pkgs.nfsUtils}/sbin/rpc.nfsd 0";
};