From: Christian Kujau <lists@nerdbynature.de>
To: Christoph Hellwig <hch@infradead.org>
Cc: linux-xfs@oss.sgi.com
Subject: Re: xfstests: nslookup not found
Date: Sun, 19 Jul 2009 16:57:19 -0700 (PDT) [thread overview]
Message-ID: <alpine.DEB.2.01.0907191653240.6439@bogon> (raw)
In-Reply-To: <20090719182012.GA10936@infradead.org>
On Sun, 19 Jul 2009 at 14:20, Christoph Hellwig wrote:
> Can you resend a patch that just moves _get_fqdn and the check for
> nslookup from common* into the "new" script?
If I understand correctly, maybe something like this would be acceptable?
I was tempted to use "hostname -f" to give out the fqdn, but appaerently
not every hostname knows "-f" and I did not want to let the whole script
fail just because nslookup is not in place.
Christian.
--- common.config.orig 2009-07-19 21:43:15.000000000 +0200
+++ common.config 2009-07-19 21:43:31.000000000 +0200
@@ -120,9 +120,6 @@ export UMOUNT_PROG="`set_prog_path umoun
export FSSTRESS_PROG="`set_prog_path fsstress $PWD/ltp/fsstress`"
[ "$FSSTRESS_PROG" = "" ] && _fatal "fsstress not found"
-export NSLOOKUP_PROG="`set_prog_path nslookup`"
-[ "$NSLOOKUP_PROG" = "" ] && _fatal "nslookup not found"
-
export PERL_PROG="`set_prog_path perl`"
[ "$PERL_PROG" = "" ] && _fatal "perl not found"
--- common.rc.orig 2009-07-19 21:44:42.000000000 +0200
+++ common.rc 2009-07-19 21:45:06.000000000 +0200
@@ -330,14 +330,6 @@ _get_pids_by_name()
-e "/[0-9]:[0-9][0-9] *$1 /s/ .*//p"
}
-# fqdn for localhost
-#
-_get_fqdn()
-{
- host=`hostname`
- $NSLOOKUP_PROG $host | $AWK_PROG '{ if ($1 == "Name:") print $2 }'
-}
-
# fix malloc libs output
#
_fix_malloc()
--- new.orig 2009-07-19 21:43:20.000000000 +0200
+++ new 2009-07-20 01:45:51.000000000 +0200
@@ -32,6 +32,17 @@ _cleanup()
:
}
+# fqdn for localhost
+_get_fqdn()
+{
+ NSLOOKUP_PROG="`set_prog_path nslookup`"
+ if [ "$NSLOOKUP_PROG" = "" ]; then
+ getent hosts `uname -n` | awk '{print $2}'
+ else
+ $NSLOOKUP_PROG `hostname` | $AWK_PROG '{ if ($1 == "Name:") print $2 }'
+ fi
+}
+
if [ ! -f group ]
then
echo "Creating the group index ..."
--
BOFH excuse #274:
It was OK before you touched it.
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next prev parent reply other threads:[~2009-07-19 23:57 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-19 17:57 xfstests: nslookup not found Christian Kujau
2009-07-19 18:20 ` Christoph Hellwig
2009-07-19 22:26 ` Eric Sandeen
2009-07-19 23:57 ` Christian Kujau [this message]
2009-07-20 0:16 ` Christoph Hellwig
2009-07-20 1:46 ` [PATCH] don't fail if nslookup is not found (was: xfstests: nslookup not found) Christian Kujau
2009-07-20 9:32 ` Christoph Hellwig
2009-07-20 17:03 ` Christian Kujau
2009-07-20 17:56 ` [PATCH] don't fail if nslookup is not found Eric Sandeen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.DEB.2.01.0907191653240.6439@bogon \
--to=lists@nerdbynature.de \
--cc=hch@infradead.org \
--cc=linux-xfs@oss.sgi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox