aboutsummaryrefslogtreecommitdiffstats
path: root/SiteSummary.pm
diff options
context:
space:
mode:
Diffstat (limited to 'SiteSummary.pm')
-rw-r--r--SiteSummary.pm11
1 files changed, 10 insertions, 1 deletions
diff --git a/SiteSummary.pm b/SiteSummary.pm
index c8fa9c7..e9f2a93 100644
--- a/SiteSummary.pm
+++ b/SiteSummary.pm
@@ -19,6 +19,7 @@ our @EXPORT = qw(
get_filepath_current
get_hardware_info
get_hostclass
+ get_localhostname
get_hostname
get_linux_kernel_ver
get_macaddresses
@@ -223,6 +224,14 @@ sub get_unique_ether_id {
}
#
+# Return the hostname string as seen on the host itself
+#
+sub get_localhostname {
+ my $hostid = shift;
+ return get_file_string($hostid, "/system/hostname");
+}
+
+#
# Return the hostname string
#
sub get_hostname {
@@ -230,7 +239,7 @@ sub get_hostname {
if (exists $hostmap{$hostid}) {
return $hostmap{$hostid};
} else {
- return get_file_string($hostid, "/system/hostname");
+ return get_localhostname($hostid);
}
}