diff options
author | Petter Reinholdtsen <pere@hungry.com> | 2008-06-01 21:43:26 +0000 |
---|---|---|
committer | Petter Reinholdtsen <pere@hungry.com> | 2008-06-01 21:43:26 +0000 |
commit | 00d16d08cc735c3f4a2f00ba3a10b9d84d607410 (patch) | |
tree | 27d7586328fc11cbcbd02bd902ac482349d1a494 | |
parent | 0c2dbea99ff4a4458fc073082cba169ea78893ae (diff) | |
download | sitesummary-00d16d08cc735c3f4a2f00ba3a10b9d84d607410.tar.gz sitesummary-00d16d08cc735c3f4a2f00ba3a10b9d84d607410.tar.bz2 sitesummary-00d16d08cc735c3f4a2f00ba3a10b9d84d607410.tar.xz |
Typos.
-rw-r--r-- | SiteSummary.pm | 6 | ||||
-rwxr-xr-x | sitesummary-nodes | 12 |
2 files changed, 8 insertions, 10 deletions
diff --git a/SiteSummary.pm b/SiteSummary.pm index 50d4fbc..630c003 100644 --- a/SiteSummary.pm +++ b/SiteSummary.pm @@ -14,6 +14,7 @@ our @EXPORT = qw( get_site get_sitegroup get_hostname + get_dns_address get_linux_kernel_ver get_debian_edu_profile get_debian_edu_ver @@ -110,6 +111,11 @@ sub get_hostname { # but fall back to the IP address if the IP address do not resolve in # DNS. # +sub in_dns { + my $hostname = shift; + my $packed_ip = gethostbyname($hostname); + return defined $packed_ip; +} sub get_dns_address { my $hostid = shift; my $hostname = get_hostname($hostid); diff --git a/sitesummary-nodes b/sitesummary-nodes index e08efcd..1a08470 100755 --- a/sitesummary-nodes +++ b/sitesummary-nodes @@ -24,12 +24,6 @@ if ($opts{'m'}) { print_list(); } -sub in_dns { - my $hostname = shift; - my $packed_ip = gethostbyname($hostname); - return defined $packed_ip; -} - sub handle_host { my $hostid = shift; my $address = get_dns_address($hostid); @@ -182,8 +176,7 @@ define service { check_command check_ssh } EOF - print <<EOF if (is_pkg_installed($hostid, "apache") || - is_pkg_installed($hostid, "apache2")); + print <<EOF if (is_pkg_installed($hostid, "apache") || is_pkg_installed($hostid, "apache2")); define service { use server-service host_name $hostname @@ -192,8 +185,7 @@ define service { } EOF - print <<EOF if (is_pkg_installed($hostid, "ntp") || - is_pkg_installed($hostid, "ntp-server")); + print <<EOF if (is_pkg_installed($hostid, "ntp") || is_pkg_installed($hostid, "ntp-server")); define service { use server-service host_name $hostname |