diff options
| author | Petter Reinholdtsen <pere@hungry.com> | 2006-08-28 16:24:08 +0000 | 
|---|---|---|
| committer | Petter Reinholdtsen <pere@hungry.com> | 2006-08-28 16:24:08 +0000 | 
| commit | 1df001a306f5bc3101076c403f8c8155c92a9693 (patch) | |
| tree | 24fc1081ce6b8aacfc5863cea7552aa734a59c49 | |
| parent | 235a3e1ac485c6a5f75254c86ee7220a02e80742 (diff) | |
| download | sitesummary-1df001a306f5bc3101076c403f8c8155c92a9693.tar.gz sitesummary-1df001a306f5bc3101076c403f8c8155c92a9693.tar.bz2 sitesummary-1df001a306f5bc3101076c403f8c8155c92a9693.tar.xz  | |
  * Remove sitecontact references.  I'm not sure it is the right place
    for it, and we can reintroduce it if it proves to be a good idea.
| -rw-r--r-- | Makefile | 1 | ||||
| -rw-r--r-- | SiteSummary.pm | 22 | ||||
| -rwxr-xr-x | collect.d/siteinfo | 3 | ||||
| -rw-r--r-- | debian/changelog | 2 | ||||
| -rwxr-xr-x | sitecontact-summary | 28 | 
5 files changed, 3 insertions, 53 deletions
@@ -19,7 +19,6 @@ COLLECTORS = \  SUMMARYSCRIPTS = \  	site-summary \ -	sitecontact-summary \  	kernelversion-summary  all: diff --git a/SiteSummary.pm b/SiteSummary.pm index bd3107e..9094c13 100644 --- a/SiteSummary.pm +++ b/SiteSummary.pm @@ -12,7 +12,6 @@ our @EXPORT  = qw(                    get_filepath_current                    get_site                    get_sitegroup -                  get_sitecontact                    get_linux_kernel_ver                     ); @@ -61,27 +60,6 @@ sub get_sitegroup {  }  # -# Return list with the mail addresses listed in sitecontact. -# -sub get_sitecontact { -    my $hostid = shift; -    my $path = get_filepath_current($hostid, "/siteinfo/sitecontact"); -    my @addr = (); -    if (open (FILE, $path)) { -        while(<FILE>) { -            chomp; -            s/\#.+$//; -            next if (/^\s*$/); -            push(@addr, split(/,\s*/, $_)); -        } -        close(FILE); -        return @addr; -    } else { -        return undef; -    } -} - -#  # Return Linux kernel version for the machines using Linux.  #  sub get_linux_kernel_ver { diff --git a/collect.d/siteinfo b/collect.d/siteinfo index e17e2e0..73ad428 100755 --- a/collect.d/siteinfo +++ b/collect.d/siteinfo @@ -2,11 +2,10 @@  # site        = location  # sitegroup   = sublocation -# sitecontact = comma-separated list of emails to site contacts  # hostclass   = type of host (server, workstation, laptop, etc)  mkdir siteinfo && cd siteinfo -for filename in site sitegroup sitecontact hostclass ; do +for filename in site sitegroup hostclass ; do      file=/etc/sitesummary/$filename      if [ -f $file ] ; then  	cp $file $filename diff --git a/debian/changelog b/debian/changelog index c00a322..b85b344 100644 --- a/debian/changelog +++ b/debian/changelog @@ -7,6 +7,8 @@ sitesummary (0.0.5) UNRELEASED; urgency=low    * Include apache2 example configuration.    * Try to create the directories in /var/lib/sitesummary/ with www-data      as the owner, to allow the cgi script to write into them. +  * Remove sitecontact references.  I'm not sure it is the right place +    for it, and we can reintroduce it if it proves to be a good idea.    [ Steffen Joeris ]    * Update debian/copyright file diff --git a/sitecontact-summary b/sitecontact-summary deleted file mode 100755 index 2639b00..0000000 --- a/sitecontact-summary +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/perl - -use strict; -use warnings; - -use SiteSummary; - -my %sitecontacts; - -for_all_hosts(\&handle_host); - -print_summary(); - -sub handle_host { -    my $hostid = shift; -    #print "$hostid\n"; -    for my $sitecontact (get_sitecontact($hostid)) { -	$sitecontact = "" unless defined $sitecontact; -	$sitecontacts{$sitecontact}++; -    } -} - -sub print_summary { -    printf("  %-20s %5s\n", "contact", "count"); -    for my $sitecontact (sort keys %sitecontacts) { -	printf("  %-20s %5d\n", $sitecontact, $sitecontacts{$sitecontact}); -    } -}  | 
