This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "IPFire 2.x development tree".
The branch, core89 has been updated via 4ff690565404a4afe9cc0eec66425303c500d140 (commit) via 2f075ff8cfd3ff9c169a878a769f351b75d84f67 (commit) via 7dfcaef067115be24633f300ef76461ebc2b29c1 (commit) via daf34294f233a414cd14d08b1269b8192b591096 (commit) via 18bbd71bdcc95b7f335061aa22e61c39df912e8c (commit) via 8d679040b7798330441c470ae361ec67db00b635 (commit) via 5c5b4000b9053d8bf993d5d0a87393f7540786c9 (commit) via 9aeac09636461df05f2423b65f7e0dc476eb0eb9 (commit) via 01c82dbaa325336698b3c826ba0ba451b90eefe0 (commit) from f379cee0b4240df34b842afa22dbcf038ec0e858 (commit)
Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below.
- Log ----------------------------------------------------------------- commit 4ff690565404a4afe9cc0eec66425303c500d140 Merge: f379cee 2f075ff Author: Arne Fitzenreiter arne_f@ipfire.org Date: Tue Apr 14 17:52:57 2015 +0200
Merge remote-tracking branch 'origin/master' into core89
-----------------------------------------------------------------------
Summary of changes: config/rootfiles/core/89/update.sh | 21 +++++++++ html/cgi-bin/netovpnrw.cgi | 6 +-- html/cgi-bin/netovpnsrv.cgi | 2 +- html/cgi-bin/ovpnmain.cgi | 8 +++- src/patches/collectd/silence-openvpn-errors.patch | 55 ++++++++++++++++++++++- 5 files changed, 85 insertions(+), 7 deletions(-)
Difference in files: diff --git a/config/rootfiles/core/89/update.sh b/config/rootfiles/core/89/update.sh index c94a1c8..d98fe7e 100644 --- a/config/rootfiles/core/89/update.sh +++ b/config/rootfiles/core/89/update.sh @@ -68,10 +68,31 @@ rm -f \ /opt/pakfire/db/*/meta-sqlite \ /opt/pakfire/db/rootfiles/sqlite
+mkdir -p /var/run/openvpn +touch /var/run/ovpnserver.log +chown nobody.nobody \ + /var/run/openvpn \ + /var/run/ovpnserver.log + # Update OpenVPN/collectd configuration +files=`find /var/ipfire/ovpn/n2nconf/ -type d` +for i in $files; +do + if ! grep -q "status-version" $i/${i##*/}.conf; then + echo "# Logfile" >> $i/${i##*/}.conf + echo "status-version 1" >> $i/${i##*/}.conf + fi + if ! grep -q "status " $i/${i##*/}.conf; then + echo "status /var/run/openvpn/${i##*/}-n2n 10" >> $i/${i##*/}.conf + fi +done + /usr/sbin/ovpn-collectd-convert chown nobody.nobody /var/ipfire/ovpn/collectd.vpn
+# Fix permissions +chown nobody.nobody /var/ipfire/dns + # Fix #10625 mkdir -p /etc/logrotate.d
diff --git a/html/cgi-bin/netovpnrw.cgi b/html/cgi-bin/netovpnrw.cgi index e0b1148..cae7770 100755 --- a/html/cgi-bin/netovpnrw.cgi +++ b/html/cgi-bin/netovpnrw.cgi @@ -20,7 +20,7 @@ ###############################################################################
use strict; - +use URI::Escape; # enable only the following on debugging purpose #use warnings; #use CGI::Carp 'fatalsToBrowser'; @@ -37,7 +37,7 @@ my %mainsettings = ();
my @vpns=();
-my @querry = split(/?/,$ENV{'QUERY_STRING'}); +my @querry = split(/?/,uri_unescape($ENV{'QUERY_STRING'})); $querry[0] = '' unless defined $querry[0]; $querry[1] = 'week' unless defined $querry[1];
@@ -59,7 +59,7 @@ if ( $querry[0] ne "" && $querry[0] ne "UNDEF"){ if(@vpns){ foreach (@vpns) { &Header::openbox('100%', 'center', "$_ $Lang::tr{'graph'}"); - &Graphs::makegraphbox("netovpnrw.cgi",$_,"week"); + &Graphs::makegraphbox("netovpnrw.cgi",$_, "day"); &Header::closebox(); } }else{ diff --git a/html/cgi-bin/netovpnsrv.cgi b/html/cgi-bin/netovpnsrv.cgi index f843462..ddf4177 100755 --- a/html/cgi-bin/netovpnsrv.cgi +++ b/html/cgi-bin/netovpnsrv.cgi @@ -59,7 +59,7 @@ if ( $querry[0] ne ""){ if (@vpns){ foreach (@vpns) { &Header::openbox('100%', 'center', "$_ $Lang::tr{'graph'}"); - &Graphs::makegraphbox("netovpnsrv.cgi",$_,"week"); + &Graphs::makegraphbox("netovpnsrv.cgi",$_, "day"); &Header::closebox(); } }else{ diff --git a/html/cgi-bin/ovpnmain.cgi b/html/cgi-bin/ovpnmain.cgi index 7ca62de..ece528a 100644 --- a/html/cgi-bin/ovpnmain.cgi +++ b/html/cgi-bin/ovpnmain.cgi @@ -3197,7 +3197,6 @@ END @firen2nconf = <FILE>; close (FILE); chomp(@firen2nconf); - } else {
$errormessage = "Filecount does not match only 2 files are allowed\n"; @@ -3238,6 +3237,13 @@ END unless(-d "${General::swroot}/ovpn/n2nconf/"){mkdir "${General::swroot}/ovpn/n2nconf", 0755 or die "Unable to create dir $!";} unless(-d "${General::swroot}/ovpn/n2nconf/$n2nname[0]"){mkdir "${General::swroot}/ovpn/n2nconf/$n2nname[0]", 0770 or die "Unable to create dir $!";}
+ #Add collectd settings to configfile + open(FILE, ">> $tempdir/$uplconffilename") or die 'Unable to open config file.'; + print FILE "# Logfile\n"; + print FILE "status-version 1\n"; + print FILE "status /var/run/openvpn/$n2nname[0]-n2n 10\n"; + close FILE; + move("$tempdir/$uplconffilename", "${General::swroot}/ovpn/n2nconf/$n2nname[0]/$uplconffilename2");
if ($? ne 0) { diff --git a/src/patches/collectd/silence-openvpn-errors.patch b/src/patches/collectd/silence-openvpn-errors.patch index c909761..c258486 100644 --- a/src/patches/collectd/silence-openvpn-errors.patch +++ b/src/patches/collectd/silence-openvpn-errors.patch @@ -1,8 +1,28 @@ diff --git a/src/openvpn.c b/src/openvpn.c -index d446e9957b68..cc33eed61e25 100644 +index d446e9957b68..ef5bf1078285 100644 --- a/src/openvpn.c +++ b/src/openvpn.c -@@ -567,7 +567,7 @@ static int openvpn_read (void) +@@ -70,6 +70,7 @@ static const char *config_keys[] = + }; + static int config_keys_num = STATIC_ARRAY_SIZE (config_keys); + ++static int version_detect (const char *filename); + + /* Helper function + * copy-n-pasted from common.c - changed delim to "," */ +@@ -540,6 +541,11 @@ static int openvpn_read (void) + continue; + } + ++ // If the version was not detected yet, we try to guess again ++ if (vpn_list[i]->version == 0) { ++ vpn_list[i]->version = version_detect(vpn_list[i]->file); ++ } ++ + switch (vpn_list[i]->version) + { + case SINGLE: +@@ -567,7 +573,7 @@ static int openvpn_read (void) read += vpn_read; }
@@ -11,3 +31,34 @@ index d446e9957b68..cc33eed61e25 100644 } /* int openvpn_read */
static int version_detect (const char *filename) +@@ -630,16 +636,6 @@ static int version_detect (const char *filename) + } + } + +- if (version == 0) +- { +- /* This is only reached during configuration, so complaining to +- * the user is in order. */ +- NOTICE ("openvpn plugin: %s: Unknown file format, please " +- "report this as bug. Make sure to include " +- "your status file, so the plugin can " +- "be adapted.", filename); +- } +- + fclose (fh); + + return version; +@@ -656,13 +652,6 @@ static int openvpn_config (const char *key, const char *value) + /* try to detect the status file format */ + status_version = version_detect (value); + +- if (status_version == 0) +- { +- WARNING ("openvpn plugin: unable to detect status version, \ +- discarding status file "%s".", value); +- return (1); +- } +- + status_file = sstrdup (value); + if (status_file == NULL) + {
hooks/post-receive -- IPFire 2.x development tree