From: myon Date: Sun, 30 Apr 2006 09:00:26 +0000 (+0000) Subject: * caff: X-Git-Url: https://git.sthu.org/?a=commitdiff_plain;h=2bf18e1cd6dc480aa947e440f45d33be9aa6d62d;p=pgp-tools.git * caff: + Try hostname without -f first to be compatible with BSD (Closes: #356830). git-svn-id: svn://svn.debian.org/pgp-tools/trunk@273 b513b33f-fedd-0310-b452-c3deb5f4c849 --- diff --git a/caff/caff b/caff/caff index 3dd62f1..9712932 100755 --- a/caff/caff +++ b/caff/caff @@ -334,9 +334,12 @@ sub generate_config() { my $gecos = defined $ENV{'LOGNAME'} ? (getpwnam($ENV{LOGNAME}))[6] : undef; my $email; my @keys; - my $hostname = `hostname -f`; + # BSD does not have hostname -f, so we try without -f first + my $hostname = `hostname`; + $hostname = `hostname -f` unless $hostname =~ /\./; chomp $hostname; my ($Cgecos,$Cemail,$Ckeys) = ('','',''); + if (defined $gecos) { $gecos =~ s/,.*//; diff --git a/debian/changelog b/debian/changelog index 4b10e4a..02ce1ab 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +signing-party (0.4.6-1) unreleased; urgency=low + + * caff: + + Try hostname without -f first to be compatible with BSD + (Closes: #356830). + + -- Christoph Berg Sun, 30 Apr 2006 10:52:10 +0200 + signing-party (0.4.5-1) unstable; urgency=low * Upgrade debhelper compatibility to the recommended level 5.