Merge branch 'pull/collectd-4.0' into collectd-4.0
authorFlorian Forster <octo@huhu.verplant.org>
Fri, 24 Aug 2007 10:12:40 +0000 (12:12 +0200)
committerFlorian Forster <octo@huhu.verplant.org>
Fri, 24 Aug 2007 10:12:40 +0000 (12:12 +0200)
README
contrib/collectd2html.pl
src/network.c

diff --git a/README b/README
index 84ca772..6f59a7a 100644 (file)
--- a/README
+++ b/README
@@ -295,6 +295,17 @@ Crosscompiling
     are likely never passed to the libm you have a good chance to be lucky.
 
 
+Contact
+-------
+
+  For questions, bugreports, development information and basically all other
+  concerns please send an email to collectd's mailinglist at
+  <collectd at verplant.org>.
+
+  For live discussion and more personal contact visit us in IRC, we're in
+  channel #collectd on freenode.
+
+
 Author
 ------
 
@@ -302,3 +313,5 @@ Author
   Sebastian tokkee Harl <sh at tokkee.org>,
   and many contributors (see `AUTHORS').
 
+  Please send bugreports and patches to the mailinglist, see `Contact' above.
+
index 6ff1c47..da143d7 100644 (file)
@@ -36,12 +36,20 @@ use warnings;
 use strict;
 use Fatal qw(open close);
 use File::Basename;
+use Getopt::Long qw(:config no_ignore_case bundling pass_through);
+
+my $DIR  = "/var/lib/collectd";
+my $HOST = "_UNDEFINED_";
+
+GetOptions (
+    "host-is=s"  => \$HOST,
+    "data-dir=s" => \$DIR
+);
 
-my $DIR = "/var/lib/collectd";
 my @COLORS = (0xff7777, 0x7777ff, 0x55ff55, 0xffcc77, 0xff77ff, 0x77ffff,
        0xffff77, 0x55aaff);
 my @tmp = `/bin/hostname`; chomp(@tmp);
-my $HOST = $tmp[0];
+$HOST = $tmp[0] if ( $HOST =~ /_UNDEFINED_/ );
 my $IMG_DIR = "${HOST}.dir";
 my $HTML = "${HOST}.html";
 
index 34385bf..84e7773 100644 (file)
@@ -1232,7 +1232,11 @@ static int network_config (const char *key, const char *val)
                                && (fields_num != 2))
                        return (1);
                else if (fields_num == 2)
+               {
+                       if ((service = strchr (fields[1], '.')) != NULL)
+                               *service = '\0';
                        service = fields[1];
+               }
                node = fields[0];
 
                if (strcasecmp ("Listen", key) == 0)