From 6de9816287fe09657b2ad1215ee7c858e376625a Mon Sep 17 00:00:00 2001 From: Christos Zoulas Date: Mon, 28 Nov 2011 10:17:18 -0500 Subject: [PATCH] Match against either the short local hostname or the fqdn name. --- amd/amfs_nfsl.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/amd/amfs_nfsl.c b/amd/amfs_nfsl.c index 8ef28ca0..4147ef22 100644 --- a/amd/amfs_nfsl.c +++ b/amd/amfs_nfsl.c @@ -116,8 +116,9 @@ amfs_nfsl_match(am_opts *fo) * call nfs_ops.fs_match(). * If link value exists (or same host), call amfs_link_ops.fs_match(). */ - if (!STRCEQ(ho, am_get_hostname())) { - plog(XLOG_INFO, "amfs_nfsl: \"%s\" is not local host, using type:=nfs", ho); + if (!STRCEQ(ho, am_get_hostname()) && !STRCEQ(ho, hostd)) { + plog(XLOG_INFO, "amfs_nfsl: \"%s\" is not the local host \"%s\", " + "or \"%s\" using type:=nfs", ho, am_get_hostname(), hostd); retval = nfs_ops.fs_match(fo); } else if (lstat(cp, &stb) < 0) { plog(XLOG_INFO, "amfs_nfsl: \"%s\" does not exist, using type:=nfs", cp); @@ -232,7 +233,8 @@ amfs_nfsl_ffserver(mntfs *mf) * call amfs_link_ops.ffserver(). * If link value exists (or same host), then call ops_nfs.ffserver(). */ - if (!STRCEQ(ho, am_get_hostname()) || lstat(cp, &stb) < 0) { + if ((!STRCEQ(ho, am_get_hostname()) && + !STRCEQ(ho, hostd)) || lstat(cp, &stb) < 0) { return nfs_ops.ffserver(mf); } else { mf->mf_flags |= MFF_NFSLINK; -- 2.43.0