On Mon, 2008-06-16 at 12:21 +0200, Matthias Koenig wrote:
> Ian Kent <[EMAIL PROTECTED]> writes:
>
> > On Fri, 2008-06-13 at 11:51 +0200, Matthias Koenig wrote:
> >> Hi,
> >>
> >> autofs will not create the autofs mountpoint path
> >> if the filesystem is not a locally mounted filesystem
> >> (e.g. a NFS mounted filesystem).
> >> contained_in_local_fs() returns false in this case.
> >> This might be intentional in most cases.
> >>
> >> But how about if the root filesystem mounted via NFS?
> >> Do you see any problems adding an exceptional rule for this
> >> case?
> >
> > Yeah, sounds sensible.
>
> Ok, how about the following patch?
Yeah, I'll commit it and post the patch to kernel.org as usual.
>
> Thanks,
> Matthias
>
> Index: autofs-5.0.3/lib/mounts.c
> ===================================================================
> --- autofs-5.0.3.orig/lib/mounts.c 2008-06-13 14:30:01.000000000 +0200
> +++ autofs-5.0.3/lib/mounts.c 2008-06-16 11:38:16.000000000 +0200
> @@ -363,6 +363,10 @@ int contained_in_local_fs(const char *pa
> if (!strncmp(path, this->path, len)) {
> if (len > 1 && pathlen > len && path[len] != '/')
> continue;
> + else if (len == 1 && this->path[0] == '/')
> + /* alway return true on rootfs, we don't care
> + * here if it is local */
> + ret = 1;
> else if (this->fs_name[0] == '/') {
> if (strlen(this->fs_name) > 1) {
> if (this->fs_name[1] != '/')
_______________________________________________
autofs mailing list
[email protected]
http://linux.kernel.org/mailman/listinfo/autofs