@@ -11,7 +11,8 @@ Wants=nfs-config.service
After=nfs-config.service
[Service]
+Environment=RPC_STATD_NO_NOTIFY=1
EnvironmentFile=-/run/sysconfig/nfs-utils
Type=forking
PIDFile=/var/run/rpc.statd.pid
-ExecStart=/usr/sbin/rpc.statd --no-notify $STATDARGS
+ExecStart=/usr/sbin/rpc.statd $STATDARGS
@@ -251,10 +251,15 @@ int main (int argc, char **argv)
int nlm_udp = 0, nlm_tcp = 0;
struct rlimit rlim;
int notify_sockfd;
+ char *env;
/* Default: daemon mode, no other options */
run_mode = 0;
+ env = getenv("RPC_STATD_NO_NOTIFY");
+ if (env && atoi(env) > 0)
+ run_mode |= MODE_NO_NOTIFY;
+
/* Log to stderr if there's an error during startup */
xlog_stderr(1);
xlog_syslog(0);
@@ -418,6 +418,11 @@ it attempts to start listeners on network transports marked 'visible' in
As long as at least one network transport listener starts successfully,
.B rpc.statd
will operate.
+.SH ENVIRONMENT
+.TP
+.B RPC_STATD_NO_NOTIFY=
+If set to a positive integer, has the same effect as
+.IR \-\-no\-notify .
.SH FILES
.TP 2.5i
.I /var/lib/nfs/sm
The significant value of allowing this is that it means that for default operation, systemd unit files do not need to pass any options to any programs. The purpose of this will become apparent in the next patch. Signed-off-by: NeilBrown <neilb@suse.com> --- systemd/rpc-statd.service | 3 ++- utils/statd/statd.c | 5 +++++ utils/statd/statd.man | 5 +++++ 3 files changed, 12 insertions(+), 1 deletion(-) -- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html