summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xutils/svn-testament.pl12
1 files changed, 12 insertions, 0 deletions
diff --git a/utils/svn-testament.pl b/utils/svn-testament.pl
index e0f678b66..2412064dd 100755
--- a/utils/svn-testament.pl
+++ b/utils/svn-testament.pl
@@ -58,6 +58,13 @@ my %userinfo; # The information about the current user
$gecos =~ s/,.+//g;
$gecos =~ s/"/'/g;
$userinfo{GECOS} = $gecos;
+
+ if ( $pwdline eq "" ) { # Try whoami if we don't have getent
+ my $pwdline = `whoami`;
+ chomp $pwdline;
+ $userinfo{USERNAME} = $pwdline;
+ $userinfo{GECOS} = $pwdline;
+ }
}
# The current date, in AmigaOS version friendly format (dd.mm.yyyy)
@@ -77,6 +84,11 @@ $qroot =~ s/"/\\"/g;
my $hostname = $ENV{HOSTNAME};
+if ( $hostname eq "" ) { # Try hostname command if env-var empty
+ $hostname = `hostname`;
+ chomp $hostname;
+}
+
$hostname = "unknown-host" unless (defined($hostname) && $hostname ne "");
$hostname =~ s/"/\\"/g;