From: Christos Zoulas Date: Mon, 28 Nov 2011 15:17:18 +0000 (-0500) Subject: Match against either the short local hostname or the fqdn name. X-Git-Url: https://git.fsl.cs.sunysb.edu/?a=commitdiff_plain;h=6de9816287fe09657b2ad1215ee7c858e376625a;p=am-utils-6.2.git Match against either the short local hostname or the fqdn name. --- 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;