With nfs-utils-1.2.9-r2 the rpc-* does not answer to my tries to set the ports for the different rpc/nfs-daemons. If I take a look at the service-files I can see that at least some services have had support for this: --- rpc-mountd.service 2013-07-13 14:05:51.000000000 +0200 +++ rpc-mountd.service-r1 2014-02-01 20:01:36.000000000 +0100 @@ -4,9 +4,7 @@ Requires=rpcbind.service nfsd.service [Service] -Type=forking -EnvironmentFile=/etc/conf.d/nfs -ExecStart=/usr/sbin/rpc.mountd $OPTS_RPC_MOUNTD +ExecStart=/usr/sbin/rpc.mountd -F [Install] WantedBy=multi-user.target Why was these options removed? The ChangeLog mentions only two bugs as "improve unit files", and they are only referencing arch-linux and fedora, both distros who has the corresponding EnvironmentFile and $opst_* specified, nothing about that/why these options should be removed. Please correct, and add EnvironmentFile=-/etc/conf.d/nfs along with the proper $OPTS_RPC_* for the different service files.
The recommended manner for configuring systemd units is with /etc/systemd/system. Create a rpc-mountd.service file there or a rpc-mountd.service.d directory.
(In reply to Alex Xu (Hello71) from comment #1) > The recommended manner for configuring systemd units is with > /etc/systemd/system. > > Create a rpc-mountd.service file there or a rpc-mountd.service.d directory. I know you can do it by creating a rpc-mountd.service or rpc-mountd.service.d to override things defined in /usr/lib/systemd/system. However I have not seen anywhere that it is recommended to override instead of configure. Can you please point me towards that documentation? That no other distribution does this, but uses EnvironmentFile instead for nfs-utils makes me less then convinced. The only thing I can find that point towards your point is suggestions to not use /etc/sysconfig, /etc/conf.d or any other distribution specific place, nor any command flags in favor of having the daemons own configuration file setting this up, but since the nfs binaries does not have any configuration like that, and this only can be set by flags for the process, it does not seem to apply here.
Also worth noting: http://git.linux-nfs.org/?p=steved/nfs-utils.git;a=commit;h=9c85f3ee4ebbfef7fb10a964f26934e671517f00 The rpc-mountd.service added upstream seems to prefer env before overriding.
/etc/conf.d/ is for openrc only really, not systemd
(In reply to SpanKY from comment #4) > /etc/conf.d/ is for openrc only really, not systemd First, is there a policy set for this? Is it documented anywhere with a preffered paths so I can file bugs against git-daemon@.service and apache2.service, two services that uses this? Is there a policy for how to handle start-parameters that you really want to be the same no matter what init-system you are using? Secondly, about the question on how to add start-parameters to the daemon (which this really is about), will Gentoo use the upstream servicefiles (with or without /usr/lib/systemd/scripts/nfs-utils_env.sh [1]) or will you continue distribute our own? This question since: (In reply to Alex Xu (Hello71) from comment #1) > The recommended manner for configuring systemd units is with > /etc/systemd/system. And if the first case, from which file do you intend to pick up the start-parameters from? [1] http://git.linux-nfs.org/?p=steved/nfs-utils.git;a=blob;f=systemd/README
(In reply to Xake from comment #5) nothing is really documented with 1.3.0, the systemd services come from upstream nfs-utils. maybe this is fixed, maybe it isn't. not really sure.