Fixing the race condition on loading nfsd. It was not a modprobe thing like I

said on 31113, but again, upstart order.

I restore the usual modprobe procedure.


svn path=/nixos/trunk/; revision=31119
This commit is contained in:
Lluís Batlle i Rossell 2011-12-28 08:44:24 +00:00
parent ef1755f3c0
commit 99cca93398

View File

@ -118,7 +118,7 @@ in
I've not tried with nfsd alone. So I add what I tried, with nfs_acl too. I've not tried with nfsd alone. So I add what I tried, with nfs_acl too.
*/ */
boot.kernelModules = mkIf cfg.server.enable [ "nfsd" "nfs_acl" ]; # boot.kernelModules = mkIf cfg.server.enable [ "nfsd" "nfs_acl" ];
jobs = jobs =
optionalAttrs cfg.server.enable optionalAttrs cfg.server.enable
@ -155,6 +155,9 @@ in
# Create a state directory required by NFSv4. # Create a state directory required by NFSv4.
mkdir -p /var/lib/nfs/v4recovery mkdir -p /var/lib/nfs/v4recovery
# rpc.nfsd needs the kernel support
${config.system.sbin.modprobe}/sbin/modprobe nfsd || true
${pkgs.sysvtools}/bin/mountpoint -q /proc/fs/nfsd \ ${pkgs.sysvtools}/bin/mountpoint -q /proc/fs/nfsd \
|| ${config.system.sbin.mount}/bin/mount -t nfsd none /proc/fs/nfsd || ${config.system.sbin.mount}/bin/mount -t nfsd none /proc/fs/nfsd
@ -183,7 +186,7 @@ in
description = "Kernel NFS server - mount daemon"; description = "Kernel NFS server - mount daemon";
startOn = "starting nfs-kernel-exports or started portmap"; startOn = "started nfs-kernel-nfsd";
stopOn = "stopped nfs-kernel-statd"; stopOn = "stopped nfs-kernel-statd";
daemonType = "fork"; daemonType = "fork";
@ -199,9 +202,9 @@ in
description = "Kernel NFS server - Network Status Monitor"; description = "Kernel NFS server - Network Status Monitor";
startOn = if (cfg.server.enable) then startOn = if (cfg.server.enable) then
"started nfs-kernel-mountd and started nfs-kernel-nfsd" "started nfs-kernel-mountd and started nfs-kernel-nfsd"
else else
"started portmap"; "started portmap";
stopOn = "stopping nfs-kernel-exports or stopping portmap"; stopOn = "stopping nfs-kernel-exports or stopping portmap";
preStart = preStart =