solaris doesn't like 'hostname -s'...

(luckily, unlike linux, it doesn't spew a usage message to STDOUT!)
redis
Sitaram Chamarty 2012-04-28 12:02:15 +05:30
parent 7d6b04605d
commit e919a0b7ca
1 changed files with 1 additions and 1 deletions

View File

@ -49,7 +49,7 @@ sub args {
}
sub print_version {
chomp( my $hn = `hostname -s` );
chomp( my $hn = `hostname -s 2>/dev/null || hostname` );
my $gv = substr( `git --version`, 12 );
$ENV{GL_USER} or _die "GL_USER not set";
print "hello $ENV{GL_USER}, this is $ENV{USER}\@$hn running gitolite3 " . version() . " on git $gv\n";