* Drop the unnecessary "nfs-kernel-" prefix from the job names.
svn path=/nixos/trunk/; revision=33159
This commit is contained in:
parent
4716ccf1b1
commit
c5ca681c06
@ -20,18 +20,6 @@ let
|
|||||||
rpc.mountd, rpc.nfsd
|
rpc.mountd, rpc.nfsd
|
||||||
rpc.statd, rpc.lockd (if necessary), and
|
rpc.statd, rpc.lockd (if necessary), and
|
||||||
rpc.rquotad"
|
rpc.rquotad"
|
||||||
|
|
||||||
I tried to mimic that with upstart, playing with stopping/stopped/started/starting
|
|
||||||
events.
|
|
||||||
|
|
||||||
I consider two scenarios:
|
|
||||||
- Starting at boot. Then, portmap will emit a started event.
|
|
||||||
- "restart nfs-kernel-exports". Then, portmap will not emit anything. Due
|
|
||||||
to the comment in postStart, this will happen on nixos-rebuild if
|
|
||||||
the exportfs file changed.
|
|
||||||
|
|
||||||
From these scenarios, I came up with the startOn and stopOn at the time of commiting
|
|
||||||
this comment.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@ -102,7 +90,7 @@ in
|
|||||||
config =
|
config =
|
||||||
mkAssert
|
mkAssert
|
||||||
(cfg.client.enable || cfg.server.enable -> config.services.portmap.enable) "
|
(cfg.client.enable || cfg.server.enable -> config.services.portmap.enable) "
|
||||||
Please enable portmap (services.portmap.enable) to use nfs-kernel.
|
Please enable portmap (services.portmap.enable) to use nfsd.
|
||||||
" {
|
" {
|
||||||
|
|
||||||
services.portmap.enable = mkAlways (cfg.client.enable || cfg.server.enable);
|
services.portmap.enable = mkAlways (cfg.client.enable || cfg.server.enable);
|
||||||
@ -114,13 +102,11 @@ in
|
|||||||
|
|
||||||
jobs =
|
jobs =
|
||||||
optionalAttrs cfg.server.enable
|
optionalAttrs cfg.server.enable
|
||||||
{ nfs_kernel_nfsd =
|
{ nfsd =
|
||||||
{ name = "nfs-kernel-nfsd";
|
{ description = "Kernel NFS server";
|
||||||
|
|
||||||
description = "Kernel NFS server";
|
|
||||||
|
|
||||||
startOn = "started portmap";
|
startOn = "started portmap";
|
||||||
stopOn = "stopped nfs-kernel-statd or stopping portmap";
|
stopOn = "stopped statd or stopping portmap";
|
||||||
|
|
||||||
preStart =
|
preStart =
|
||||||
''
|
''
|
||||||
@ -160,13 +146,11 @@ in
|
|||||||
}
|
}
|
||||||
|
|
||||||
// optionalAttrs cfg.server.enable
|
// optionalAttrs cfg.server.enable
|
||||||
{ nfs_kernel_mountd =
|
{ mountd =
|
||||||
{ name = "nfs-kernel-mountd";
|
{ description = "Kernel NFS server - mount daemon";
|
||||||
|
|
||||||
description = "Kernel NFS server - mount daemon";
|
startOn = "started nfsd";
|
||||||
|
stopOn = "stopped statd";
|
||||||
startOn = "started nfs-kernel-nfsd";
|
|
||||||
stopOn = "stopped nfs-kernel-statd";
|
|
||||||
|
|
||||||
daemonType = "fork";
|
daemonType = "fork";
|
||||||
|
|
||||||
@ -175,16 +159,14 @@ in
|
|||||||
}
|
}
|
||||||
|
|
||||||
// optionalAttrs (cfg.client.enable || cfg.server.enable)
|
// optionalAttrs (cfg.client.enable || cfg.server.enable)
|
||||||
{ nfs_kernel_statd =
|
{ statd =
|
||||||
{ name = "nfs-kernel-statd";
|
{ 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 mountd and started nfsd"
|
||||||
else
|
else
|
||||||
"started portmap";
|
"started portmap";
|
||||||
stopOn = "stopping nfs-kernel-nfsd or stopping portmap";
|
stopOn = "stopping nfsd or stopping portmap";
|
||||||
|
|
||||||
preStart =
|
preStart =
|
||||||
''
|
''
|
||||||
|
Loading…
x
Reference in New Issue
Block a user