]> git.ipfire.org Git - ipfire-3.x.git/commitdiff
Some logical changes on distcc host things.
authorMichael Tremer <michael.tremer@ipfire.org>
Sat, 28 Feb 2009 22:06:05 +0000 (23:06 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Sat, 28 Feb 2009 22:06:05 +0000 (23:06 +0100)
tools/make-compilers

index f86514a2338afb0f2a6ef8a7defb0853b29b5794..9a9f98f3ce78f90649d687be120aa0d4446e6182 100755 (executable)
@@ -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