diff --git a/common.config b/common.config index 15c7976e..fecbabe1 100644 --- a/common.config +++ b/common.config @@ -120,9 +120,6 @@ export UMOUNT_PROG="`set_prog_path umount`" 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" diff --git a/common.rc b/common.rc index 74a4900c..0d655ca7 100644 --- a/common.rc +++ b/common.rc @@ -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() diff --git a/new b/new index 8e32824b..08fc401e 100755 --- a/new +++ b/new @@ -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 ..."