summaryrefslogtreecommitdiffstats
path: root/utils/mount/nfsmount.c
diff options
context:
space:
mode:
authorNeil Brown <neilb@suse.de>2007-03-16 11:24:15 +1100
committerNeil Brown <neilb@suse.de>2007-03-16 11:24:15 +1100
commit993ec3f888a28c60d49ae0f8f1aa725b6b618a81 (patch)
treef9bf13c76979fc1a4958dfad37459cb7bf823c2e /utils/mount/nfsmount.c
parentdad50c0e589b5651242de50e81200b036d995b73 (diff)
downloadnfs-utils-993ec3f888a28c60d49ae0f8f1aa725b6b618a81.tar.gz
nfs-utils-993ec3f888a28c60d49ae0f8f1aa725b6b618a81.tar.xz
nfs-utils-993ec3f888a28c60d49ae0f8f1aa725b6b618a81.zip
Automatically start statd when mounting an nfs filesystem.
If statd is not running (/var/run/rpc.statd.pid) when an nfs filesystem is mounted (v2 or v3, with remote locking enabled), and if /usr/sbin/start-statd (or other program specified at config time) is present, then run that program to start statd. This means that statd does not need to be running "just in case". It only needs to be started at boot time if the nfs server is started.
Diffstat (limited to 'utils/mount/nfsmount.c')
-rw-r--r--utils/mount/nfsmount.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/utils/mount/nfsmount.c b/utils/mount/nfsmount.c
index 6226f6c..0188caa 100644
--- a/utils/mount/nfsmount.c
+++ b/utils/mount/nfsmount.c
@@ -818,7 +818,7 @@ nfsmnt_check_compat(const struct pmap *nfs_pmap, const struct pmap *mnt_pmap)
int
nfsmount(const char *spec, const char *node, int *flags,
char **extra_opts, char **mount_opts, int *nfs_mount_vers,
- int running_bg)
+ int running_bg, int *need_statd)
{
static char *prev_bg_host;
char hostdir[1024];
@@ -1185,6 +1185,7 @@ noauth_flavors:
strcat(new_opts, cbuf);
*extra_opts = xstrdup(new_opts);
+ *need_statd = ! (data.flags & NFS_MOUNT_NONLM);
return 0;
/* abort */