Bug#637627: hostname -A has multiple values

Thorsten Glaser t.glaser at tarent.de
Mon Aug 3 10:52:11 UTC 2015


Hi,

this patch is wrong!

commit c2087b165bd0fdc6511df4c874390359b290b8bf
Author: Gianfranco Costamagna <costamagnagianfranco at yahoo.it>
Date:   Mon Aug 3 11:15:11 2015 +0200

    Use a hostname -A as fallback in case of -f fails (Closes: #637627)
    thanks <mapreri> for the help

diff --git a/pbuilder-modules b/pbuilder-modules
index f28b2db..7568176 100644
--- a/pbuilder-modules
+++ b/pbuilder-modules
@@ -482,7 +482,7 @@ function extractbuildplace () {
            exit 1
        fi
        log "I: creating local configuration"
-       hostname -f > "$BUILDPLACE/etc/mailname"
+       hostname -f || hostname -A > "$BUILDPLACE/etc/mailname"
     fi
     copy_local_configuration


This is because hostname -A has multiple output:

tglase at tglase:~ $ hostname -A
tglase.lan.tarent.de tgwrk.ig42.org 

bye,
//mirabilos
-- 
tarent solutions GmbH
Rochusstraße 2-4, D-53123 Bonn • http://www.tarent.de/
Tel: +49 228 54881-393 • Fax: +49 228 54881-235
HRB 5168 (AG Bonn) • USt-ID (VAT): DE122264941
Geschäftsführer: Dr. Stefan Barth, Kai Ebenrett, Boris Esser, Alexander Steeg



More information about the Pbuilder-maint mailing list