collectd: Ignore errors from OpenVPN configuration file
authorMichael Tremer <michael.tremer@ipfire.org>
Sun, 12 Apr 2015 20:44:50 +0000 (22:44 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Sun, 12 Apr 2015 20:44:50 +0000 (22:44 +0200)
lfs/collectd
src/patches/collectd/silence-openvpn-errors.patch [new file with mode: 0644]

index 6f9c0e5..1573e38 100644 (file)
@@ -101,6 +101,7 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
        cd $(DIR_APP) && patch -p1 -i $(DIR_SRC)/src/patches/collectd/0020-openvpn-Make-read-functions-robust-like-in-8516f9abb.patch
        cd $(DIR_APP) && patch -p1 -i $(DIR_SRC)/src/patches/collectd/0021-openvpn-Fix-copy-and-paste-error.patch
        cd $(DIR_APP) && patch -p1 -i $(DIR_SRC)/src/patches/collectd/0022-openvpn-Change-data-type-from-COUNTER-to-DERIVE.patch
+       cd $(DIR_APP) && patch -p1 -i $(DIR_SRC)/src/patches/collectd/silence-openvpn-errors.patch
        cd $(DIR_APP) && ./configure --prefix=/usr --localstatedir=/var \
                --disable-{apple_sensors,csv,ipvs,mbmon,memcached,mysql} \
                --disable-{netlink,nginx,nut,perl,serial,snmp,tape,vserver,xmms} \
diff --git a/src/patches/collectd/silence-openvpn-errors.patch b/src/patches/collectd/silence-openvpn-errors.patch
new file mode 100644 (file)
index 0000000..c909761
--- /dev/null
@@ -0,0 +1,13 @@
+diff --git a/src/openvpn.c b/src/openvpn.c
+index d446e9957b68..cc33eed61e25 100644
+--- a/src/openvpn.c
++++ b/src/openvpn.c
+@@ -567,7 +567,7 @@ static int openvpn_read (void)
+               read += vpn_read;
+       }
+-      return (read ? 0 : -1);
++      return 0;
+ } /* int openvpn_read */
+ static int version_detect (const char *filename)