summaryrefslogtreecommitdiff
path: root/Configure
diff options
context:
space:
mode:
authorPeter Prymmer <PPrymmer@factset.com>2000-10-03 05:05:59 -0700
committerJarkko Hietaniemi <jhi@iki.fi>2000-10-03 22:09:41 +0000
commitf08cbdd1c4c30753f0b3b06d9c4ae199518e065a (patch)
tree5169067e57512fa3288f9e1a15be0aacf0ea8332 /Configure
parente020c87d6f7ea3827bebbe7b39b6e63992dab130 (diff)
downloadperl-f08cbdd1c4c30753f0b3b06d9c4ae199518e065a.tar.gz
It is possible to have no hosts database at all. Pointed out in
Subject: [PATCH: 7131] PWPASSWD problem for passwd less pwd's Message-ID: <Pine.OSF.4.10.10010031203470.388222-100000@aspara.forte.com> p4raw-id: //depot/perl@7139
Diffstat (limited to 'Configure')
-rwxr-xr-xConfigure27
1 files changed, 16 insertions, 11 deletions
diff --git a/Configure b/Configure
index ae6712fb23..dadb98acae 100755
--- a/Configure
+++ b/Configure
@@ -20,7 +20,7 @@
# $Id: Head.U,v 3.0.1.9 1997/02/28 15:02:09 ram Exp $
#
-# Generated on Tue Oct 3 05:18:15 EET DST 2000 [metaconfig 3.0 PL70]
+# Generated on Wed Oct 4 01:09:27 EET DST 2000 [metaconfig 3.0 PL70]
# (with additional metaconfig patches by perlbug@perl.org)
cat >/tmp/c1$$ <<EOF
@@ -7116,18 +7116,23 @@ case "$myhostname" in
/[ ]$myhostname[ . ]/p" > hosts
}
tmp_re="[ . ]"
- $test x`$awk "/[0-9].*[ ]$myhostname$tmp_re/ { sum++ }
+ if $test -f hosts; then
+ $test x`$awk "/[0-9].*[ ]$myhostname$tmp_re/ { sum++ }
END { print sum }" hosts` = x1 || tmp_re="[ ]"
- dflt=.`$awk "/[0-9].*[ ]$myhostname$tmp_re/ {for(i=2; i<=NF;i++) print \\\$i}" \
- hosts | $sort | $uniq | \
- $sed -n -e "s/$myhostname\.\([-a-zA-Z0-9_.]\)/\1/p"`
- case `$echo X$dflt` in
- X*\ *) echo "(Several hosts in /etc/hosts matched hostname)"
+ dflt=.`$awk "/[0-9].*[ ]$myhostname$tmp_re/ {for(i=2; i<=NF;i++) print \\\$i}" \
+ hosts | $sort | $uniq | \
+ $sed -n -e "s/$myhostname\.\([-a-zA-Z0-9_.]\)/\1/p"`
+ case `$echo X$dflt` in
+ X*\ *) echo "(Several hosts in the database matched hostname)"
+ dflt=.
+ ;;
+ X.) echo "(You do not have fully-qualified names in the hosts database)"
+ ;;
+ esac
+ else
+ echo "(I cannot locate a hosts database anywhere)"
dflt=.
- ;;
- X.) echo "(You do not have fully-qualified names in /etc/hosts)"
- ;;
- esac
+ fi
case "$dflt" in
.)
tans=`./loc resolv.conf X /etc /usr/etc`