|
|
306fa1 |
autofs-5.0.9 - amd lookup add remopts handling
|
|
|
306fa1 |
|
|
|
306fa1 |
From: Ian Kent <raven@themaw.net>
|
|
|
306fa1 |
|
|
|
306fa1 |
|
|
|
306fa1 |
---
|
|
|
306fa1 |
modules/parse_amd.c | 10 ++++++++--
|
|
|
306fa1 |
1 file changed, 8 insertions(+), 2 deletions(-)
|
|
|
306fa1 |
|
|
|
306fa1 |
diff --git a/modules/parse_amd.c b/modules/parse_amd.c
|
|
|
306fa1 |
index bf673b3..4cebce8 100644
|
|
|
306fa1 |
--- a/modules/parse_amd.c
|
|
|
306fa1 |
+++ b/modules/parse_amd.c
|
|
|
306fa1 |
@@ -988,20 +988,26 @@ static int do_nfs_mount(struct autofs_point *ap, const char *name,
|
|
|
306fa1 |
struct amd_entry *entry, unsigned int flags)
|
|
|
306fa1 |
{
|
|
|
306fa1 |
char target[PATH_MAX + 1];
|
|
|
306fa1 |
+ unsigned int proximity;
|
|
|
306fa1 |
+ char *opts = entry->opts;
|
|
|
306fa1 |
int ret = 0;
|
|
|
306fa1 |
|
|
|
306fa1 |
strcpy(target, entry->rhost);
|
|
|
306fa1 |
strcat(target, ":");
|
|
|
306fa1 |
strcat(target, entry->rfs);
|
|
|
306fa1 |
|
|
|
306fa1 |
+ proximity = get_network_proximity(entry->rhost);
|
|
|
306fa1 |
+ if (proximity == PROXIMITY_OTHER && entry->remopts)
|
|
|
306fa1 |
+ opts = entry->remopts;
|
|
|
306fa1 |
+
|
|
|
306fa1 |
if (!entry->sublink) {
|
|
|
306fa1 |
ret = mount_nfs->mount_mount(ap, ap->path, name, strlen(name),
|
|
|
306fa1 |
- target, entry->type, entry->opts,
|
|
|
306fa1 |
+ target, entry->type, opts,
|
|
|
306fa1 |
mount_nfs->context);
|
|
|
306fa1 |
} else {
|
|
|
306fa1 |
if (!is_mounted(_PATH_MOUNTED, entry->fs, MNTS_REAL)) {
|
|
|
306fa1 |
ret = mount_nfs->mount_mount(ap, entry->fs, "/", 1,
|
|
|
306fa1 |
- target, entry->type, entry->opts,
|
|
|
306fa1 |
+ target, entry->type, opts,
|
|
|
306fa1 |
mount_nfs->context);
|
|
|
306fa1 |
if (ret)
|
|
|
306fa1 |
goto out;
|