From 2bf18e1cd6dc480aa947e440f45d33be9aa6d62d Mon Sep 17 00:00:00 2001 From: myon Date: Sun, 30 Apr 2006 09:00:26 +0000 Subject: [PATCH] * 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 --- caff/caff | 5 ++++- debian/changelog | 8 ++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) 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. -- 2.39.5