From 9600035e02619d6d58d7828b4f9ce893b520538a Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 12 Jul 2010 15:14:26 +0000 Subject: [PATCH] * Don't use "starting" events because they basically don't work - they cause restarting of jobs to hang indefinitely because the required "start on" condition never triggers. For instance, after "stop nfs-kernel-nfsd", "start nfs-kernel-nfsd" will hang until we do "stop portmap; start portmap". This is due to the "starting nfs-kernel-nfsd and started portmap" condition in the nfs-kernel-mountd job. Apparently, because portmap is already running, the condition "started portmap" never happens because no event is emitted. svn path=/nixos/trunk/; revision=22562 --- modules/services/network-filesystems/nfs-kernel.nix | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/modules/services/network-filesystems/nfs-kernel.nix b/modules/services/network-filesystems/nfs-kernel.nix index ca59a27dc363..8e9729f5f8b0 100644 --- a/modules/services/network-filesystems/nfs-kernel.nix +++ b/modules/services/network-filesystems/nfs-kernel.nix @@ -96,7 +96,6 @@ in description = "Kernel NFS server"; startOn = "started network-interfaces"; - stopOn = "stopping network-interfaces"; preStart = '' @@ -131,7 +130,7 @@ in description = "Kernel NFS server"; - startOn = "started nfs-kernel-exports and started portmap"; + 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}"; @@ -146,7 +145,7 @@ in description = "Kernel NFS server - mount daemon"; - startOn = "starting nfs-kernel-nfsd and started portmap"; + startOn = "started portmap"; stopOn = "stopped nfs-kernel-nfsd"; daemonType = "fork"; @@ -161,7 +160,7 @@ in description = "Kernel NFS server - Network Status Monitor"; - startOn = "started portmap" + optionalString cfg.server.enable " and starting nfs-kernel-nfsd"; + startOn = "started portmap"; stopOn = "never"; preStart =