Author: eelco
Date: Thu Nov 25 16:51:07 2010
New Revision: 24858
URL: https://svn.nixos.org/websvn/nix/?rev=24858&sc=1
Log:
* Create /var/lib/nfs/v4recovery.
Modified:
nixos/trunk/modules/services/network-filesystems/nfs-kernel.nix
Modified: nixos/trunk/modules/services/network-filesystems/nfs-kernel.nix
==============================================================================
--- nixos/trunk/modules/services/network-filesystems/nfs-kernel.nix Thu Nov
25 15:59:08 2010 (r24857)
+++ nixos/trunk/modules/services/network-filesystems/nfs-kernel.nix Thu Nov
25 16:51:07 2010 (r24858)
@@ -133,7 +133,15 @@
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";
};
_______________________________________________
nix-commits mailing list
[email protected]
http://mail.cs.uu.nl/mailman/listinfo/nix-commits