From: Michael Tremer Date: Sat, 28 Feb 2009 22:06:05 +0000 (+0100) Subject: Some logical changes on distcc host things. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=071a9911bec594117ba3c2223889af15d85f511c;p=ipfire-3.x.git Some logical changes on distcc host things. --- diff --git a/tools/make-compilers b/tools/make-compilers index f86514a23..9a9f98f3c 100755 --- a/tools/make-compilers +++ b/tools/make-compilers @@ -103,8 +103,8 @@ distcc_get_hosts() { echo "$i" >> $BASEDIR/distcc/hosts_new done if [ -s "$BASEDIR/distcc/hosts_new" ]; then - cat $BASEDIR/distcc/hosts_new | distcc_test_hosts > $BASEDIR/distcc/hosts - rm -f $BASEDIR/distcc/hosts_new + cat $BASEDIR/distcc/hosts_new | distcc_test_hosts > $BASEDIR/distcc/hosts_new + mv $BASEDIR/distcc/hosts{_new,} fi } @@ -119,7 +119,8 @@ distcc_test_hosts() { host=$(awk -F: '{ print $1 }' <<<${i}) jobs=${i##*/} port=$(awk -F: '{ print $2 }' <<<${i} | awk -F/ '{ print $1 }') - ip=$($BASEDIR/tools/resolver $host) + ip=$($BASEDIR/tools/resolver $host 2>/dev/null) + [ -n "$ip" ] || continue if ping -c3 -w5 ${ip} &>/dev/null; then if [ -n "$(which nc 2>/dev/null)" ]; then