From a9d245a185340c47285d53074dedbcacabf2393c Mon Sep 17 00:00:00 2001 From: rcorreia Date: Fri, 20 Mar 2009 04:40:07 +0000 Subject: [PATCH] Branch b_hd_kdmu b=17623 Fix bug where mount.lustre wasn't converting hostnames when mounting clients. --- lustre/utils/mount_lustre.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lustre/utils/mount_lustre.c b/lustre/utils/mount_lustre.c index 5b5902b..04f59e7 100644 --- a/lustre/utils/mount_lustre.c +++ b/lustre/utils/mount_lustre.c @@ -528,11 +528,9 @@ int main(int argc, char *const argv[]) usage(stderr); } - /* Only convert hostname if device ends in '-client', otherwise it's + /* Only convert hostnames if usource contains a '@', otherwise it's probably a ZFS dataset name */ - usource_len = strlen(usource); - if (usource_len > 7 && - strcmp(&usource[usource_len - 8], "-client") == 0) { + if (strchr(usource, '@') != NULL) { source = convert_hostnames(usource); if (!source) { usage(stderr); -- 1.8.3.1