aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsrc/util/gethostname.pl8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/util/gethostname.pl b/src/util/gethostname.pl
index 26b09ad..f3e112e 100755
--- a/src/util/gethostname.pl
+++ b/src/util/gethostname.pl
@@ -12,6 +12,14 @@
use strict;
+# Get the user's idea of this system's host name
+my $userhostname = `cat ~/.hostname 2> /dev/null`;
+chomp $userhostname;
+if ($userhostname ne '') {
+ print "$userhostname\n";
+ exit 0;
+}
+
# Get the system's idea of its host name
my $hostname = `hostname`;
chomp $hostname;