From: Sam Hartman Date: Fri, 2 Aug 2002 21:31:36 +0000 (+0000) Subject: avoid using host X-Git-Tag: debian/1.2.6-1~5 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=3e1607041a21410b6025462882bd01bfd17c53e1;p=packages%2Fo%2Fopenafs.git avoid using host --- diff --git a/debian/openafs-client.postinst b/debian/openafs-client.postinst index b16f8a190..fec53387c 100644 --- a/debian/openafs-client.postinst +++ b/debian/openafs-client.postinst @@ -38,11 +38,10 @@ case "$1" in db_get openafs-client/cell-info if [ "x$RET" != "x" ] ; then echo \>$THISCELL >/etc/openafs/CellServDB.new - for hname in $RET ; do - host $hname |perl -anle \ - 'print "$F[2] # $F[0]" if $F[1] eq "A"' \ - >>/etc/openafs/CellServDB.new - done + perl -MSocket -e 'foreach (@ARGV) {' \ + -e '@a=gethostbyname($_) and ' \ + -e 'printf("%s\t\t# %s\n",inet_ntoa($a[4]),$a[0]) }' $RET \ + >>/etc/openafs/CellServDB.new if [ `wc -l &1 db_reset openafs-client/cell-info ||true