aboutsummaryrefslogtreecommitdiffstats
path: root/SiteSummary.pm
diff options
context:
space:
mode:
Diffstat (limited to 'SiteSummary.pm')
-rw-r--r--SiteSummary.pm14
1 files changed, 14 insertions, 0 deletions
diff --git a/SiteSummary.pm b/SiteSummary.pm
index 78fc71f..beddd4c 100644
--- a/SiteSummary.pm
+++ b/SiteSummary.pm
@@ -11,6 +11,7 @@ our @EXPORT = qw(
for_all_hosts
get_debian_edu_profile
get_debian_edu_ver
+ get_debian_ver
get_default_route
get_dns_address
get_filepath_current
@@ -249,6 +250,19 @@ sub get_debian_edu_ver {
}
}
+sub get_debian_ver {
+ my $hostid = shift;
+ my $path = get_filepath_current($hostid, "/debian/debian_version");
+ if (open (my $fh, $path)) {
+ my $version = <$fh>;
+ chomp $version;
+ close($fh);
+ return $version;
+ } else {
+ return undef;
+ }
+}
+
sub get_hardware_info {
my $hostid = shift;
my $path = get_filepath_current($hostid, "/system/dmidecode");