diff options
-rw-r--r-- | debian/changelog | 1 | ||||
-rwxr-xr-x | sitesummary-nodes | 18 |
2 files changed, 17 insertions, 2 deletions
diff --git a/debian/changelog b/debian/changelog index 91c375a..b9b589b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -6,6 +6,7 @@ sitesummary (0.0.41) UNRELEASED; urgency=low * Fix slow propagation of information on first time install, by making sure the server cron job calls sitesummary-client before processing all entries. + * Add usage information to sitesummary-nodes. -- Petter Reinholdtsen <pere@debian.org> Sun, 8 Jun 2008 14:20:40 +0200 diff --git a/sitesummary-nodes b/sitesummary-nodes index c5b2f70..b753a76 100755 --- a/sitesummary-nodes +++ b/sitesummary-nodes @@ -9,14 +9,28 @@ use warnings; use SiteSummary; use Getopt::Std; +sub usage { + print <<EOF; +Usage: $0 [-hmnw] + + -h Show usage information + -m Generate munin configuration for all munin clients + -n Generate nagios configuration for all nagios clients + -w List all client DNS/IP-addresses and MAC addresses +EOF +} + my %opts; -getopts("mnw", \%opts); +getopts("hmnw", \%opts) || (usage(), exit(1)); my %hostnames; for_all_hosts(\&handle_host); -if ($opts{'m'}) { +if ($opts{'h'}) { + usage(); + exit 0; +} elsif ($opts{'m'}) { print_munin_list(); } elsif ($opts{'w'}) { print_ip_hw_list(); |