From: "Michael Rayment" <mike@cs.mun.ca>
To: nfs@lists.sourceforge.net
Subject: Autofs problem while using new nfs-utils package
Date: Sat, 6 Oct 2007 02:19:20 -0230 [thread overview]
Message-ID: <200710060219.20536.mike@cs.mun.ca> (raw)
I just emerged the latest gentoo release of the nfs-utils package,
nfs-utils-1.1.0-r1.ebuild. I found that the autofs code did not work for my
diskless computers that have a readonly /etc directory with a /etc/mtab
symbolically linked to /proc/mounts. This was because the creation of the
mtab lock file /etc/mtab~nnnn failed. I noticed that in the update_mtab()
function, a check was put in to acertain whether this situation existed and
silently carried on whereas the add_mtab() function did not perform the check
and consequently failed. My simple minded fix was to add the the same check
to add_mtab() as can be seen in the context diff below. Automounting worked
fine after the fix was applied. Hopefully some fix will make its way into
the authoratative release so that I do not have to patch my code locally.
Thanks,
Michael Rayment
*** utils/mount/mount.c.sav Sat Oct 6 01:52:21 2007
--- utils/mount/mount.c Sat Oct 6 01:55:25 2007
***************
*** 181,188 ****
--- 181,191 ----
update_mtab(ment.mnt_dir, &ment);
return 0;
}
+ if (mtab_does_not_exist() || !mtab_is_writable())
+ return 0;
+
lock_mtab();
if ((mtab = setmntent(MOUNTED, "a+")) == NULL) {
fprintf(stderr, "Can't open " MOUNTED);
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
NFS maillist - NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs
next reply other threads:[~2007-10-06 4:49 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-06 4:49 Michael Rayment [this message]
2007-10-08 15:58 ` Autofs problem while using new nfs-utils package Chuck Lever
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200710060219.20536.mike@cs.mun.ca \
--to=mike@cs.mun.ca \
--cc=nfs@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox