diff options
author | Petter Reinholdtsen <pere@hungry.com> | 2011-12-24 08:32:10 +0000 |
---|---|---|
committer | Petter Reinholdtsen <pere@hungry.com> | 2011-12-24 08:32:10 +0000 |
commit | 1d32feb825442eb26e978456d7f3d6ef6463d2b8 (patch) | |
tree | 1d499f7e504360ed566ea2b0188af56ee7a566fc /SiteSummary.pm | |
parent | 75153746eb95b28a4955865ec9b5f01141ae0ddc (diff) | |
download | sitesummary-1d32feb825442eb26e978456d7f3d6ef6463d2b8.tar.gz sitesummary-1d32feb825442eb26e978456d7f3d6ef6463d2b8.tar.bz2 sitesummary-1d32feb825442eb26e978456d7f3d6ef6463d2b8.tar.xz |
Make sure DNS, IMAPS and Squid checks can be tested on clients
as well as the server.
Diffstat (limited to 'SiteSummary.pm')
-rw-r--r-- | SiteSummary.pm | 11 |
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); } } |