]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/commitdiff
Merge branch 'next' of ssh://git.ipfire.org/pub/git/ipfire-2.x into next
authorMatthias Fischer <fischerm@ipfire.org>
Wed, 15 Apr 2015 18:46:44 +0000 (20:46 +0200)
committerMatthias Fischer <fischerm@ipfire.org>
Wed, 15 Apr 2015 18:46:44 +0000 (20:46 +0200)
48 files changed:
config/backup/include
config/menu/20-status.menu
config/rootfiles/core/89/update.sh
config/rootfiles/core/90/exclude [new file with mode: 0644]
config/rootfiles/core/90/filelists/apache2 [new symlink]
config/rootfiles/core/90/filelists/armv5tel/linux-kirkwood [new symlink]
config/rootfiles/core/90/filelists/armv5tel/linux-multi [new symlink]
config/rootfiles/core/90/filelists/armv5tel/linux-rpi [new symlink]
config/rootfiles/core/90/filelists/curl [new symlink]
config/rootfiles/core/90/filelists/cyrus-sasl [new symlink]
config/rootfiles/core/90/filelists/dhcp [new symlink]
config/rootfiles/core/90/filelists/dhcpcd [new symlink]
config/rootfiles/core/90/filelists/dracut [new symlink]
config/rootfiles/core/90/filelists/expat [new symlink]
config/rootfiles/core/90/filelists/files [new file with mode: 0644]
config/rootfiles/core/90/filelists/groff [new symlink]
config/rootfiles/core/90/filelists/i586/acpid [new symlink]
config/rootfiles/core/90/filelists/i586/linux [new symlink]
config/rootfiles/core/90/filelists/i586/linux-initrd [new symlink]
config/rootfiles/core/90/filelists/iputils [new symlink]
config/rootfiles/core/90/filelists/libjpeg [new symlink]
config/rootfiles/core/90/filelists/logrotate [new symlink]
config/rootfiles/core/90/filelists/logwatch [new symlink]
config/rootfiles/core/90/filelists/openssl [new symlink]
config/rootfiles/core/90/filelists/strongswan [new symlink]
config/rootfiles/core/90/filelists/udev [new symlink]
config/rootfiles/core/90/filelists/wpa_supplicant [new symlink]
config/rootfiles/core/90/meta [new file with mode: 0644]
config/rootfiles/core/90/update.sh [new file with mode: 0644]
doc/language_issues.de
doc/language_issues.en
doc/language_issues.es
doc/language_issues.fr
doc/language_issues.nl
doc/language_issues.pl
doc/language_issues.ru
doc/language_issues.tr
doc/language_missings
html/cgi-bin/netovpnrw.cgi
html/cgi-bin/netovpnsrv.cgi
html/cgi-bin/ovpnmain.cgi
html/cgi-bin/pakfire.cgi
html/cgi-bin/services.cgi
langs/de/cgi-bin/de.pl
langs/en/cgi-bin/en.pl
lfs/collectd
make.sh
src/patches/collectd/silence-openvpn-errors.patch [new file with mode: 0644]

index d7a1d3a329b1773a9ead5d4352cd2f88629c5989..159ff9a5837a530d711c089d59b6265965eee0db 100644 (file)
@@ -13,6 +13,7 @@
 /etc/hosts*
 /etc/httpd/*
 /etc/ssh/ssh_host*
+/etc/ssh/sshd_config
 /etc/logrotate.d
 /var/ipfire/auth/users
 /var/ipfire/dhcp/*
index 802885ee3a441a29ca4da3fc33baf93621060481..2bcf0d5e8d0784ba5065005303c3cddc47e64557 100644 (file)
                                'enabled' => 1,
                          };
        $substatus->{'53.networkovpn'} = {
-                               'caption' => "$Lang::tr{'openvpn client'}",
+                               'caption' => "$Lang::tr{'vpn statistic rw'}",
                                'uri' => '/cgi-bin/netovpnrw.cgi',
-                               'title' => "$Lang::tr{'openvpn client'}",
+                               'title' => "$Lang::tr{'vpn statistic rw'}",
                                'enabled' => 1,
                          };
        $substatus->{'54.networkovpnsrv'} = {
-                               'caption' => "$Lang::tr{'openvpn server'}",
+                               'caption' => "$Lang::tr{'vpn statistic n2n'}",
                                'uri' => '/cgi-bin/netovpnsrv.cgi',
-                               'title' => "$Lang::tr{'openvpn server'}",
+                               'title' => "$Lang::tr{'vpn statistics n2n'}",
                                'enabled' => 1,
                          };
     $substatus->{'60.hardwaregraphs'} = {
index e15f9378b03e645ecc151c1f60f5be197d7b276a..90a6d776b09e0434967660d186635a4836265500 100644 (file)
@@ -47,7 +47,9 @@ cat <<EOF >> /etc/sysconfig/createfiles
 EOF
 
 # Update /etc/collectd.conf
-echo "include \"/etc/collectd.vpn\"" >> /etc/collectd.conf
+if ! grep -q "collectd.vpn" /etc/collectd.conf; then
+       echo "include \"/etc/collectd.vpn\"" >> /etc/collectd.conf
+fi
 
 # Generate ddns configuration file
 sudo -u nobody /srv/web/ipfire/cgi-bin/ddns.cgi
@@ -66,8 +68,30 @@ 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/config/rootfiles/core/90/exclude b/config/rootfiles/core/90/exclude
new file mode 100644 (file)
index 0000000..5be5371
--- /dev/null
@@ -0,0 +1,26 @@
+boot/config.txt
+etc/collectd.custom
+etc/ipsec.conf
+etc/ipsec.secrets
+etc/ipsec.user.conf
+etc/ipsec.user.secrets
+etc/localtime
+etc/rc.d/rcsysinit.d/S19checkfstab
+etc/rc.d/rcsysinit.d/S70console
+etc/shadow
+etc/ssh/ssh_config
+etc/ssh/sshd_config
+etc/ssl/openssl.cnf
+etc/sudoers
+etc/sysconfig/firewall.local
+etc/sysconfig/modules
+etc/sysconfig/rc.local
+etc/udev/rules.d/30-persistent-network.rules
+srv/web/ipfire/html/proxy.pac
+var/ipfire/time
+var/ipfire/ovpn/ccd.conf
+var/ipfire/ovpn/ccdroute
+var/ipfire/ovpn/ccdroute2
+var/log/cache
+var/state/dhcp/dhcpd.leases
+var/updatecache
diff --git a/config/rootfiles/core/90/filelists/apache2 b/config/rootfiles/core/90/filelists/apache2
new file mode 120000 (symlink)
index 0000000..eef95ef
--- /dev/null
@@ -0,0 +1 @@
+../../../common/apache2
\ No newline at end of file
diff --git a/config/rootfiles/core/90/filelists/armv5tel/linux-kirkwood b/config/rootfiles/core/90/filelists/armv5tel/linux-kirkwood
new file mode 120000 (symlink)
index 0000000..7217107
--- /dev/null
@@ -0,0 +1 @@
+../../../../common/armv5tel/linux-kirkwood
\ No newline at end of file
diff --git a/config/rootfiles/core/90/filelists/armv5tel/linux-multi b/config/rootfiles/core/90/filelists/armv5tel/linux-multi
new file mode 120000 (symlink)
index 0000000..204eb4c
--- /dev/null
@@ -0,0 +1 @@
+../../../../common/armv5tel/linux-multi
\ No newline at end of file
diff --git a/config/rootfiles/core/90/filelists/armv5tel/linux-rpi b/config/rootfiles/core/90/filelists/armv5tel/linux-rpi
new file mode 120000 (symlink)
index 0000000..a651a49
--- /dev/null
@@ -0,0 +1 @@
+../../../../common/armv5tel/linux-rpi
\ No newline at end of file
diff --git a/config/rootfiles/core/90/filelists/curl b/config/rootfiles/core/90/filelists/curl
new file mode 120000 (symlink)
index 0000000..4b84bef
--- /dev/null
@@ -0,0 +1 @@
+../../../common/curl
\ No newline at end of file
diff --git a/config/rootfiles/core/90/filelists/cyrus-sasl b/config/rootfiles/core/90/filelists/cyrus-sasl
new file mode 120000 (symlink)
index 0000000..bb51b4c
--- /dev/null
@@ -0,0 +1 @@
+../../../common/cyrus-sasl
\ No newline at end of file
diff --git a/config/rootfiles/core/90/filelists/dhcp b/config/rootfiles/core/90/filelists/dhcp
new file mode 120000 (symlink)
index 0000000..32d8da4
--- /dev/null
@@ -0,0 +1 @@
+../../../common/dhcp
\ No newline at end of file
diff --git a/config/rootfiles/core/90/filelists/dhcpcd b/config/rootfiles/core/90/filelists/dhcpcd
new file mode 120000 (symlink)
index 0000000..1e799da
--- /dev/null
@@ -0,0 +1 @@
+../../../common/dhcpcd
\ No newline at end of file
diff --git a/config/rootfiles/core/90/filelists/dracut b/config/rootfiles/core/90/filelists/dracut
new file mode 120000 (symlink)
index 0000000..1608699
--- /dev/null
@@ -0,0 +1 @@
+../../../common/dracut
\ No newline at end of file
diff --git a/config/rootfiles/core/90/filelists/expat b/config/rootfiles/core/90/filelists/expat
new file mode 120000 (symlink)
index 0000000..e1923cf
--- /dev/null
@@ -0,0 +1 @@
+../../../common/expat
\ No newline at end of file
diff --git a/config/rootfiles/core/90/filelists/files b/config/rootfiles/core/90/filelists/files
new file mode 100644 (file)
index 0000000..2ef5ded
--- /dev/null
@@ -0,0 +1,7 @@
+etc/system-release
+etc/issue
+etc/rc.d/init.d/network-trigger
+etc/rc.d/rcsysinit.d/S90network-trigger
+usr/lib/firewall/rules.pl
+var/ipfire/backup/include
+var/ipfire/langs
diff --git a/config/rootfiles/core/90/filelists/groff b/config/rootfiles/core/90/filelists/groff
new file mode 120000 (symlink)
index 0000000..232291e
--- /dev/null
@@ -0,0 +1 @@
+../../../common/groff
\ No newline at end of file
diff --git a/config/rootfiles/core/90/filelists/i586/acpid b/config/rootfiles/core/90/filelists/i586/acpid
new file mode 120000 (symlink)
index 0000000..21d36ee
--- /dev/null
@@ -0,0 +1 @@
+../../../../common/i586/acpid
\ No newline at end of file
diff --git a/config/rootfiles/core/90/filelists/i586/linux b/config/rootfiles/core/90/filelists/i586/linux
new file mode 120000 (symlink)
index 0000000..693ec4b
--- /dev/null
@@ -0,0 +1 @@
+../../../../common/i586/linux
\ No newline at end of file
diff --git a/config/rootfiles/core/90/filelists/i586/linux-initrd b/config/rootfiles/core/90/filelists/i586/linux-initrd
new file mode 120000 (symlink)
index 0000000..32a03e6
--- /dev/null
@@ -0,0 +1 @@
+../../../../common/i586/linux-initrd
\ No newline at end of file
diff --git a/config/rootfiles/core/90/filelists/iputils b/config/rootfiles/core/90/filelists/iputils
new file mode 120000 (symlink)
index 0000000..361c28f
--- /dev/null
@@ -0,0 +1 @@
+../../../common/iputils
\ No newline at end of file
diff --git a/config/rootfiles/core/90/filelists/libjpeg b/config/rootfiles/core/90/filelists/libjpeg
new file mode 120000 (symlink)
index 0000000..3b1a782
--- /dev/null
@@ -0,0 +1 @@
+../../../common/libjpeg
\ No newline at end of file
diff --git a/config/rootfiles/core/90/filelists/logrotate b/config/rootfiles/core/90/filelists/logrotate
new file mode 120000 (symlink)
index 0000000..bc192c0
--- /dev/null
@@ -0,0 +1 @@
+../../../common/logrotate
\ No newline at end of file
diff --git a/config/rootfiles/core/90/filelists/logwatch b/config/rootfiles/core/90/filelists/logwatch
new file mode 120000 (symlink)
index 0000000..f14eabd
--- /dev/null
@@ -0,0 +1 @@
+../../../common/logwatch
\ No newline at end of file
diff --git a/config/rootfiles/core/90/filelists/openssl b/config/rootfiles/core/90/filelists/openssl
new file mode 120000 (symlink)
index 0000000..e011a92
--- /dev/null
@@ -0,0 +1 @@
+../../../common/openssl
\ No newline at end of file
diff --git a/config/rootfiles/core/90/filelists/strongswan b/config/rootfiles/core/90/filelists/strongswan
new file mode 120000 (symlink)
index 0000000..90c727e
--- /dev/null
@@ -0,0 +1 @@
+../../../common/strongswan
\ No newline at end of file
diff --git a/config/rootfiles/core/90/filelists/udev b/config/rootfiles/core/90/filelists/udev
new file mode 120000 (symlink)
index 0000000..e967a1c
--- /dev/null
@@ -0,0 +1 @@
+../../../common/udev
\ No newline at end of file
diff --git a/config/rootfiles/core/90/filelists/wpa_supplicant b/config/rootfiles/core/90/filelists/wpa_supplicant
new file mode 120000 (symlink)
index 0000000..1d04c03
--- /dev/null
@@ -0,0 +1 @@
+../../../common/wpa_supplicant
\ No newline at end of file
diff --git a/config/rootfiles/core/90/meta b/config/rootfiles/core/90/meta
new file mode 100644 (file)
index 0000000..d547fa8
--- /dev/null
@@ -0,0 +1 @@
+DEPS=""
diff --git a/config/rootfiles/core/90/update.sh b/config/rootfiles/core/90/update.sh
new file mode 100644 (file)
index 0000000..6af052c
--- /dev/null
@@ -0,0 +1,248 @@
+#!/bin/bash
+############################################################################
+#                                                                          #
+# This file is part of the IPFire Firewall.                                #
+#                                                                          #
+# IPFire is free software; you can redistribute it and/or modify           #
+# it under the terms of the GNU General Public License as published by     #
+# the Free Software Foundation; either version 3 of the License, or        #
+# (at your option) any later version.                                      #
+#                                                                          #
+# IPFire is distributed in the hope that it will be useful,                #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of           #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the            #
+# GNU General Public License for more details.                             #
+#                                                                          #
+# You should have received a copy of the GNU General Public License        #
+# along with IPFire; if not, write to the Free Software                    #
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA #
+#                                                                          #
+# Copyright (C) 2014 IPFire-Team <info@ipfire.org>.                        #
+#                                                                          #
+############################################################################
+#
+. /opt/pakfire/lib/functions.sh
+/usr/local/bin/backupctrl exclude >/dev/null 2>&1
+
+
+function find_device() {
+       local mountpoint="${1}"
+
+       local root
+       local dev mp fs flags rest
+       while read -r dev mp fs flags rest; do
+               # Skip unwanted entries
+               [ "${dev}" = "rootfs" ] && continue
+
+               if [ "${mp}" = "${mountpoint}" ] && [ -b "${dev}" ]; then
+                       root="$(basename "${dev}")"
+                       break
+               fi
+       done < /proc/mounts
+
+       # Get the actual device from the partition that holds /
+       while [ -n "${root}" ]; do
+               if [ -e "/sys/block/${root}" ]; then
+                       echo "${root}"
+                       return 0
+               fi
+
+               # Remove last character
+               root="${root::-1}"
+       done
+
+       return 1
+}
+
+
+#
+# Remove old core updates from pakfire cache to save space...
+core=90
+for (( i=1; i<=${core}; i++ ))
+do
+       rm -f /var/cache/pakfire/core-upgrade-*-$i.ipfire
+done
+
+#
+# Do some sanity checks.
+case $(uname -r) in
+       *-ipfire-versatile )
+               /usr/bin/logger -p syslog.emerg -t ipfire \
+                       "core-update-${core}: ERROR cannot update. versatile support is dropped."
+               # Report no error to pakfire. So it does not try to install it again.
+               exit 0
+               ;;
+       *-ipfire* )
+               # Ok.
+               ;;
+       * )
+               /usr/bin/logger -p syslog.emerg -t ipfire \
+                       "core-update-${core}: ERROR cannot update. No IPFire Kernel."
+               exit 1
+       ;;
+esac
+
+
+#
+#
+KVER="xxxKVERxxx"
+
+# Check diskspace on root
+ROOTSPACE=`df / -Pk | sed "s| * | |g" | cut -d" " -f4 | tail -n 1`
+
+if [ $ROOTSPACE -lt 100000 ]; then
+       /usr/bin/logger -p syslog.emerg -t ipfire \
+               "core-update-${core}: ERROR cannot update because not enough free space on root."
+       exit 2
+fi
+
+
+echo
+echo Update Kernel to $KVER ...
+#
+# Remove old kernel, configs, initrd, modules, dtb's ...
+#
+rm -rf /boot/System.map-*
+rm -rf /boot/config-*
+rm -rf /boot/ipfirerd-*
+rm -rf /boot/initramfs-*
+rm -rf /boot/vmlinuz-*
+rm -rf /boot/uImage-ipfire-*
+rm -rf /boot/uInit-ipfire-*
+rm -rf /boot/dtb-*-ipfire-*
+rm -rf /lib/modules
+
+case "$(uname -m)" in
+       armv*)
+               # Backup uEnv.txt if exist
+               if [ -e /boot/uEnv.txt ]; then
+                       cp -vf /boot/uEnv.txt /boot/uEnv.txt.org
+               fi
+
+               # work around the u-boot folder detection bug
+               mkdir -pv /boot/dtb-$KVER-ipfire-kirkwood
+               mkdir -pv /boot/dtb-$KVER-ipfire-multi
+               ;;
+esac
+
+#
+#Stop services
+/etc/init.d/snort stop
+/etc/init.d/squid stop
+/etc/init.d/ipsec stop
+/etc/init.d/apache stop
+
+#
+#Extract files
+tar xavf /opt/pakfire/tmp/files* --no-overwrite-dir -p --numeric-owner -C /
+
+# Check diskspace on boot
+BOOTSPACE=`df /boot -Pk | sed "s| * | |g" | cut -d" " -f4 | tail -n 1`
+
+if [ $BOOTSPACE -lt 1000 ]; then
+       case $(uname -r) in
+               *-ipfire-kirkwood )
+                       # Special handling for old kirkwood images.
+                       # (install only kirkwood kernel)
+                       rm -rf /boot/*
+                       # work around the u-boot folder detection bug
+                       mkdir -pv /boot/dtb-$KVER-ipfire-kirkwood
+                       tar xavf /opt/pakfire/tmp/files* --no-overwrite-dir -p \
+                               --numeric-owner -C / --wildcards 'boot/*-kirkwood*'
+                       ;;
+               * )
+                       /usr/bin/logger -p syslog.emerg -t ipfire \
+                               "core-update-${core}: FATAL-ERROR space run out on boot. System is not bootable..."
+                       /etc/init.d/apache start
+                       exit 4
+                       ;;
+       esac
+fi
+
+# Update Language cache
+perl -e "require '/var/ipfire/lang.pl'; &Lang::BuildCacheLang"
+
+#
+# Start services
+#
+/etc/init.d/apache start
+/etc/init.d/squid start
+/etc/init.d/snort start
+if [ `grep "ENABLED=on" /var/ipfire/vpn/settings` ]; then
+       /etc/init.d/ipsec start
+fi
+
+case "$(uname -m)" in
+       i?86)
+       case "$(find_device "/")" in
+               xvd* )
+                       echo Skip remove grub2 files, because pygrub fail.
+                       rm -f /boot/grub/*
+                       echo config will recreated by linux-pae install.
+                       ;;
+               * )
+                       #
+                       # Update to GRUB2 config
+                       #
+                       grub-mkconfig > /boot/grub/grub.cfg
+                       ;;
+       esac
+esac
+
+# Force (re)install pae kernel if pae is supported
+rm -rf /opt/pakfire/db/*/meta-linux-pae
+if [ ! "$(grep "^flags.* pae " /proc/cpuinfo)" == "" ]; then
+       ROOTSPACE=`df / -Pk | sed "s| * | |g" | cut -d" " -f4 | tail -n 1`
+       BOOTSPACE=`df /boot -Pk | sed "s| * | |g" | cut -d" " -f4 | tail -n 1`
+       if [ $BOOTSPACE -lt 12000 -o $ROOTSPACE -lt 90000 ]; then
+               /usr/bin/logger -p syslog.emerg -t ipfire \
+                       "core-update-${core}: WARNING not enough space for pae kernel."
+       else
+               echo "Name: linux-pae" > /opt/pakfire/db/installed/meta-linux-pae
+               echo "ProgVersion: 0" >> /opt/pakfire/db/installed/meta-linux-pae
+               echo "Release: 0"     >> /opt/pakfire/db/installed/meta-linux-pae
+               echo "Name: linux-pae" > /opt/pakfire/db/meta/meta-linux-pae
+               echo "ProgVersion: 0" >> /opt/pakfire/db/meta/meta-linux-pae
+               echo "Release: 0"     >> /opt/pakfire/db/meta/meta-linux-pae
+       fi
+fi
+
+#
+# After pakfire has ended run it again and update the lists and do upgrade
+#
+echo '#!/bin/bash'                                        >  /tmp/pak_update
+echo 'while [ "$(ps -A | grep " update.sh")" != "" ]; do' >> /tmp/pak_update
+echo '    sleep 1'                                        >> /tmp/pak_update
+echo 'done'                                               >> /tmp/pak_update
+echo 'while [ "$(ps -A | grep " pakfire")" != "" ]; do'   >> /tmp/pak_update
+echo '    sleep 1'                                        >> /tmp/pak_update
+echo 'done'                                               >> /tmp/pak_update
+echo '/opt/pakfire/pakfire update -y --force'             >> /tmp/pak_update
+echo '/opt/pakfire/pakfire upgrade -y'                    >> /tmp/pak_update
+echo '/opt/pakfire/pakfire upgrade -y'                    >> /tmp/pak_update
+echo '/opt/pakfire/pakfire upgrade -y'                    >> /tmp/pak_update
+echo '/usr/bin/logger -p syslog.emerg -t ipfire "Core-upgrade finished. If you use a customized grub/uboot config"' >> /tmp/pak_update
+echo '/usr/bin/logger -p syslog.emerg -t ipfire "Check it before reboot !!!"' >> /tmp/pak_update
+echo '/usr/bin/logger -p syslog.emerg -t ipfire " *** Please reboot... *** "' >> /tmp/pak_update
+echo 'touch /var/run/need_reboot ' >> /tmp/pak_update
+#
+killall -KILL pak_update
+chmod +x /tmp/pak_update
+/tmp/pak_update &
+
+sync
+
+#
+#Finish
+(
+       /etc/init.d/fireinfo start
+       sendprofile
+) >/dev/null 2>&1 &
+
+echo
+echo Please wait until pakfire has ended...
+echo
+
+# Don't report the exitcode last command
+exit 0
+
index 59bbe9673fc38ecb946e5b2bec5c4b4a4153d64b..3a31661f36020be486c095e4c34dcb9c3701673a 100644 (file)
@@ -641,3 +641,4 @@ WARNING: untranslated string: routing config added
 WARNING: untranslated string: routing config changed
 WARNING: untranslated string: routing table
 WARNING: untranslated string: show tls-auth key
+WARNING: untranslated string: vpn statistics n2n
index 53e5f963cb28f282a69c60fe904a4be13672c225..da14d97b8cbd5d4af61a0d67219fd99d35ec986b 100644 (file)
@@ -671,3 +671,4 @@ WARNING: untranslated string: route config changed
 WARNING: untranslated string: routing config added
 WARNING: untranslated string: routing config changed
 WARNING: untranslated string: routing table
+WARNING: untranslated string: vpn statistics n2n
index 58945abe95862105193bf47cbd538241d7c36bd8..f76cd5e6a6acd02033d03107a4786c1b6c6b5257 100644 (file)
@@ -1032,6 +1032,9 @@ WARNING: untranslated string: urlfilter redirect template
 WARNING: untranslated string: vendor
 WARNING: untranslated string: visit us at
 WARNING: untranslated string: vpn keyexchange
+WARNING: untranslated string: vpn statistic n2n
+WARNING: untranslated string: vpn statistic rw
+WARNING: untranslated string: vpn statistics n2n
 WARNING: untranslated string: wlan client
 WARNING: untranslated string: wlan client advanced settings
 WARNING: untranslated string: wlan client and
index 943b19717a6f92e2682d64cdda9c1dce59dc1785..178ddff61b15be0735bc7f384cf9f6b948ee6ed1 100644 (file)
@@ -1043,6 +1043,9 @@ WARNING: untranslated string: urlfilter redirect template
 WARNING: untranslated string: vendor
 WARNING: untranslated string: visit us at
 WARNING: untranslated string: vpn keyexchange
+WARNING: untranslated string: vpn statistic n2n
+WARNING: untranslated string: vpn statistic rw
+WARNING: untranslated string: vpn statistics n2n
 WARNING: untranslated string: wlan client
 WARNING: untranslated string: wlan client advanced settings
 WARNING: untranslated string: wlan client and
index 309fbc79c39f2230ad09d5a44a1edc8cbc994aa9..1053474fc9de0ed96e0486305f34af03cdd9f258 100644 (file)
@@ -749,3 +749,6 @@ WARNING: untranslated string: source ip country
 WARNING: untranslated string: ta key
 WARNING: untranslated string: upload dh key
 WARNING: untranslated string: vendor
+WARNING: untranslated string: vpn statistic n2n
+WARNING: untranslated string: vpn statistic rw
+WARNING: untranslated string: vpn statistics n2n
index 58945abe95862105193bf47cbd538241d7c36bd8..f76cd5e6a6acd02033d03107a4786c1b6c6b5257 100644 (file)
@@ -1032,6 +1032,9 @@ WARNING: untranslated string: urlfilter redirect template
 WARNING: untranslated string: vendor
 WARNING: untranslated string: visit us at
 WARNING: untranslated string: vpn keyexchange
+WARNING: untranslated string: vpn statistic n2n
+WARNING: untranslated string: vpn statistic rw
+WARNING: untranslated string: vpn statistics n2n
 WARNING: untranslated string: wlan client
 WARNING: untranslated string: wlan client advanced settings
 WARNING: untranslated string: wlan client and
index de929418d037574dedba327128ca0e349534b78b..f524498c0a7a1dcf80eeac96426ec48d731adb27 100644 (file)
@@ -1021,6 +1021,9 @@ WARNING: untranslated string: urlfilter redirect template
 WARNING: untranslated string: vendor
 WARNING: untranslated string: visit us at
 WARNING: untranslated string: vpn keyexchange
+WARNING: untranslated string: vpn statistic n2n
+WARNING: untranslated string: vpn statistic rw
+WARNING: untranslated string: vpn statistics n2n
 WARNING: untranslated string: wlan client
 WARNING: untranslated string: wlan client advanced settings
 WARNING: untranslated string: wlan client and
index 679bc762791b590457e30c40a98b6b776da410c5..310b63668e27466acc4b0bc7b9333207d3915e49 100644 (file)
@@ -677,3 +677,6 @@ WARNING: untranslated string: route config changed
 WARNING: untranslated string: routing config added
 WARNING: untranslated string: routing config changed
 WARNING: untranslated string: routing table
+WARNING: untranslated string: vpn statistic n2n
+WARNING: untranslated string: vpn statistic rw
+WARNING: untranslated string: vpn statistics n2n
index 05798b91145465f748a1d3aea7123c4814ec687b..0d73d2acfc90c767f39fb0813b662e5eaac3f9d8 100644 (file)
 < vendor
 < visit us at
 < vpn keyexchange
+< vpn statistic n2n
+< vpn statistic rw
 < wlanap access point
 < wlanap channel
 < wlanap country
 < vendor
 < visit us at
 < vpn keyexchange
+< vpn statistic n2n
+< vpn statistic rw
 < wlanap country
 < wlan client
 < wlan client advanced settings
 < vendor
 < visit us at
 < vpn keyexchange
+< vpn statistic n2n
+< vpn statistic rw
 < wlanap country
 < wlan client
 < wlan client advanced settings
 < vendor
 < visit us at
 < vpn keyexchange
+< vpn statistic n2n
+< vpn statistic rw
 < week-graph
 < wlanap country
 < wlan client
index e0b114884a8c9cd64cdb4081e95df0f73ec42278..cae7770bb0f897b3a3a8aa8f258258373681551e 100755 (executable)
@@ -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{
index f843462db703612d5c725a7251d8a0816ffdf89d..ddf41771a5b5226b3eb254b2cb3e136996c9512e 100755 (executable)
@@ -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{
index 9550ca6736cd56bfb1687b19a460fa7064a9b743..6bf7b2bfd520f5abfd0a90c1ef31e38fd9a199c0 100644 (file)
@@ -213,7 +213,7 @@ sub writeserverconf {
     print CONF "writepid /var/run/openvpn.pid\n";
     print CONF "#DAN prepare OpenVPN for listening on blue and orange\n";
     print CONF ";local $sovpnsettings{'VPN_IP'}\n";
-    print CONF "dev $sovpnsettings{'DDEVICE'}\n";
+    print CONF "dev tun\n";
     print CONF "proto $sovpnsettings{'DPROTOCOL'}\n";
     print CONF "port $sovpnsettings{'DDEST_PORT'}\n";
     print CONF "script-security 3 system\n";
@@ -231,15 +231,15 @@ sub writeserverconf {
     # Check if we are using mssfix, fragment or mtu-disc and set the corretct mtu of 1500.
     # If we doesn't use one of them, we can use the configured mtu value.
     if ($sovpnsettings{'MSSFIX'} eq 'on') 
-       { print CONF "$sovpnsettings{'DDEVICE'}-mtu 1500\n"; }
+       { print CONF "tun-mtu 1500\n"; }
     elsif ($sovpnsettings{'FRAGMENT'} ne '' && $sovpnsettings{'DPROTOCOL'} ne 'tcp') 
-       { print CONF "$sovpnsettings{'DDEVICE'}-mtu 1500\n"; }
+       { print CONF "tun-mtu 1500\n"; }
     elsif (($sovpnsettings{'PMTU_DISCOVERY'} eq 'yes') ||
        ($sovpnsettings{'PMTU_DISCOVERY'} eq 'maybe') ||
        ($sovpnsettings{'PMTU_DISCOVERY'} eq 'no' ))
-       { print CONF "$sovpnsettings{'DDEVICE'}-mtu 1500\n"; } 
+       { print CONF "tun-mtu 1500\n"; } 
     else 
-       { print CONF "$sovpnsettings{'DDEVICE'}-mtu $sovpnsettings{'DMTU'}\n"; }
+       { print CONF "tun-mtu $sovpnsettings{'DMTU'}\n"; }
 
     if ($vpnsettings{'ROUTES_PUSH'} ne '') {
                @temp = split(/\n/,$vpnsettings{'ROUTES_PUSH'});
@@ -1167,7 +1167,6 @@ if ($cgiparams{'ACTION'} eq $Lang::tr{'save'} && $cgiparams{'TYPE'} eq '' && $cg
     $vpnsettings{'VPN_IP'} = $cgiparams{'VPN_IP'};
 #new settings for daemon
     $vpnsettings{'DOVPN_SUBNET'} = $cgiparams{'DOVPN_SUBNET'};
-    $vpnsettings{'DDEVICE'} = $cgiparams{'DDEVICE'};
     $vpnsettings{'DPROTOCOL'} = $cgiparams{'DPROTOCOL'};
     $vpnsettings{'DDEST_PORT'} = $cgiparams{'DDEST_PORT'};
     $vpnsettings{'DMTU'} = $cgiparams{'DMTU'};
@@ -2138,7 +2137,7 @@ if ($confighash{$cgiparams{'KEY'}}[3] eq 'net'){
    print CLIENTCONF "# Server Gateway Network\n"; 
    print CLIENTCONF "route $remsubnet[0] $remsubnet[1]\n";
    print CLIENTCONF "# tun Device\n"; 
-   print CLIENTCONF "dev $vpnsettings{'DDEVICE'}\n"; 
+   print CLIENTCONF "dev tun\n"; 
    print CLIENTCONF "# Port and Protokoll\n"; 
    print CLIENTCONF "port $confighash{$cgiparams{'KEY'}}[29]\n"; 
    
@@ -2230,21 +2229,21 @@ else
     print CLIENTCONF "tls-client\r\n";
     print CLIENTCONF "client\r\n";
     print CLIENTCONF "nobind\r\n";
-    print CLIENTCONF "dev $vpnsettings{'DDEVICE'}\r\n";
+    print CLIENTCONF "dev tun\r\n";
     print CLIENTCONF "proto $vpnsettings{'DPROTOCOL'}\r\n";
 
     # Check if we are using fragment, mssfix or mtu-disc and set MTU to 1500
     # or use configured value.
     if ($vpnsettings{FRAGMENT} ne '' && $vpnsettings{DPROTOCOL} ne 'tcp' )
-       { print CLIENTCONF "$vpnsettings{'DDEVICE'}-mtu 1500\r\n"; }
+       { print CLIENTCONF "tun-mtu 1500\r\n"; }
     elsif ($vpnsettings{MSSFIX} eq 'on')
-       { print CLIENTCONF "$vpnsettings{'DDEVICE'}-mtu 1500\r\n"; }
+       { print CLIENTCONF "tun-mtu 1500\r\n"; }
     elsif (($vpnsettings{'PMTU_DISCOVERY'} eq 'yes') ||
            ($vpnsettings{'PMTU_DISCOVERY'} eq 'maybe') ||
            ($vpnsettings{'PMTU_DISCOVERY'} eq 'no' )) 
-       { print CLIENTCONF "$vpnsettings{'DDEVICE'}-mtu 1500\r\n"; }
+       { print CLIENTCONF "tun-mtu 1500\r\n"; }
     else
-       { print CLIENTCONF "$vpnsettings{'DDEVICE'}-mtu $vpnsettings{'DMTU'}\r\n"; }
+       { print CLIENTCONF "tun-mtu $vpnsettings{'DMTU'}\r\n"; }
 
     if ( $vpnsettings{'ENABLED'} eq 'on'){
        print CLIENTCONF "remote $vpnsettings{'VPN_IP'} $vpnsettings{'DDEST_PORT'}\r\n";
@@ -3198,7 +3197,6 @@ END
                @firen2nconf = <FILE>;
                close (FILE);
                chomp(@firen2nconf);
-
        } else {
 
                $errormessage = "Filecount does not match only 2 files are allowed\n";
@@ -3239,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) {
@@ -4951,9 +4956,6 @@ END
     $checked{'ENABLED_ORANGE'}{'off'} = '';
     $checked{'ENABLED_ORANGE'}{'on'} = '';
     $checked{'ENABLED_ORANGE'}{$cgiparams{'ENABLED_ORANGE'}} = 'CHECKED';
-    $selected{'DDEVICE'}{'tun'} = '';
-    $selected{'DDEVICE'}{'tap'} = '';
-    $selected{'DDEVICE'}{$cgiparams{'DDEVICE'}} = 'SELECTED';
 
     $selected{'DPROTOCOL'}{'udp'} = '';
     $selected{'DPROTOCOL'}{'tcp'} = '';
@@ -5045,10 +5047,6 @@ END
     print <<END;
     <tr><td class='base' nowrap='nowrap' colspan='2'>$Lang::tr{'local vpn hostname/ip'}:<br /><input type='text' name='VPN_IP' value='$cgiparams{'VPN_IP'}' size='30' /></td>
        <td class='boldbase' nowrap='nowrap' colspan='2'>$Lang::tr{'ovpn subnet'}<br /><input type='TEXT' name='DOVPN_SUBNET' value='$cgiparams{'DOVPN_SUBNET'}' size='30' /></td></tr>
-    <tr><td class='boldbase' nowrap='nowrap'>$Lang::tr{'ovpn device'}</td>
-        <td><select name='DDEVICE' ><option value='tun' $selected{'DDEVICE'}{'tun'}>TUN</option>
-                                       <!-- this is still not working
-                                           <option value='tap' $selected{'DDEVICE'}{'tap'}>TAP</option></select>--> </td>                                  
     <tr><td class='boldbase' nowrap='nowrap'>$Lang::tr{'protocol'}</td>
         <td><select name='DPROTOCOL'><option value='udp' $selected{'DPROTOCOL'}{'udp'}>UDP</option>
                                            <option value='tcp' $selected{'DPROTOCOL'}{'tcp'}>TCP</option></select></td>                                    
@@ -5549,42 +5547,49 @@ END
     }
 
        print <<END
-       <hr size='1'>
+
+       <br><hr><br>
+
        <form method='post' enctype='multipart/form-data'>
-       <table width='100%' border='0'cellspacing='1' cellpadding='0'>
-       <tr>
-               <td class'base'><b>$Lang::tr{'upload ca certificate'}</b></td>
-       </tr>
-       <tr>
-               <td class='base' nowrap='nowrap'>$Lang::tr{'ca name'}:</td>
-               <td nowrap='nowrap'><input type='text' name='CA_NAME' value='$cgiparams{'CA_NAME'}' size='15' align='left'/></td>
-               <td nowrap='nowrap'><input type='file' name='FH' size='25' />
-               <td nowrap='nowrap' align='right'><input type='submit' name='ACTION' value='$Lang::tr{'upload ca certificate'}' /></td>
-       </tr>
+               <table border='0' width='100%'>
+                       <tr>
+                               <td colspan='4'><b>$Lang::tr{'upload ca certificate'}</b></td>
+                       </tr>
 
-       <tr align='right'>
-               <td colspan='4' align='right' width='80%'><input type='submit' name='ACTION' value='$Lang::tr{'show crl'}' /></td>
-       </tr>
+                       <tr>
+                               <td width='10%'>$Lang::tr{'ca name'}:</td>
+                               <td width='30%'><input type='text' name='CA_NAME' value='$cgiparams{'CA_NAME'}' size='15' align='left'></td>
+                               <td width='30%'><input type='file' name='FH' size='25'>
+                               <td width='30%'align='right'><input type='submit' name='ACTION' value='$Lang::tr{'upload ca certificate'}'></td>
+                       </tr>
 
-       <tr><td colspan=4><hr /></td></tr><tr>
-       <tr>
-               <td class'base'><b>$Lang::tr{'ovpn dh parameters'}</b></td>
-       </tr>
+                       <tr>
+                               <td colspan='3'>&nbsp;</td>
+                               <td align='right'><input type='submit' name='ACTION' value='$Lang::tr{'show crl'}' /></td>
+                       </tr>
+               </table>
 
-       <tr>
-               <td class='base' nowrap='nowrap'>$Lang::tr{'ovpn dh upload'}:</td>
-               <td nowrap='nowrap'><size='15' align='left'/></td>
-               <td nowrap='nowrap'><input type='file' name='FH' size='25' />
-               <td colspan='4' align='right'><input type='submit' name='ACTION' value='$Lang::tr{'upload dh key'}' /></td>
-       </tr>
-       <tr>
-               <td class='base' nowrap='nowrap'>$Lang::tr{'ovpn dh new key'}:</td>
-               <td nowrap='nowrap'><size='15' align='left'/></td>
-               <td nowrap='nowrap'><input type='submit' name='ACTION' value='$Lang::tr{'generate dh key'}' /></td>
-       </tr>
-       </table>
+               <br>
+
+               <table border='0' width='100%'>
+                       <tr>
+                               <td colspan='4'><b>$Lang::tr{'ovpn dh parameters'}</b></td>
+                       </tr>
+
+                       <tr>
+                               <td width='40%'>$Lang::tr{'ovpn dh upload'}:</td>
+                               <td width='30%'><input type='file' name='FH' size='25'>
+                               <td width='30%' align='right'><input type='submit' name='ACTION' value='$Lang::tr{'upload dh key'}'></td>
+                       </tr>
+
+                       <tr>
+                               <td width='40%'>$Lang::tr{'ovpn dh new key'}:</td>
+                               <td colspan='2' width='60%' align='right'><input type='submit' name='ACTION' value='$Lang::tr{'generate dh key'}' /></td>
+                       </tr>
+               </table>
+       </form>
        
-       <tr><td colspan=4><hr /></td></tr><tr>
+       <br><hr>
 END
        ;
 
index 2a7ca8407f08a29546cb5bf9148a2cc824ac4dc6..143f123b7f71853905175421fe21c55cb73ea96f 100644 (file)
@@ -191,14 +191,14 @@ if ($return) {
                        <form method='post' action='$ENV{'SCRIPT_NAME'}'>
                                <input type='image' alt='$Lang::tr{'reload'}' title='$Lang::tr{'reload'}' src='/images/view-refresh.png' />
                        </form>
-               <tr><td colspan='2' align='left'><pre>
+               <tr><td colspan='2' align='left'><code>
 END
        my @output = `grep pakfire /var/log/messages | tail -20`;
        foreach (@output) {
-               print "$_";
+               print "$_<br>";
        }
        print <<END;
-                       </pre>
+                       </code>
                </table>
 END
        &Header::closebox();
index 6bfa5bbbe81a5607b91deb6991a70b0ee055e72c..76bd9edebc048213fe2040ae0bba11267ef8fefb 100644 (file)
@@ -188,6 +188,9 @@ END
                        # mdadm should not stopped with webif because this could crash the system
                        #
                        chomp($_);
+                       if ( $_ eq 'squid' ) {
+                               next;
+                       }
                        if ( ($_ ne "alsa") && ($_ ne "mdadm") ) {
                                $lines++;
                                if ($lines % 2){
index 859c8d3085a62b7e3e53b6d5fa302e4947653098..fe4a2008425e475f63d7c879fa4d8c387de0b780 100644 (file)
 'vpn payload compression' => 'Datennutzlast-Kompression aushandeln',
 'vpn red name' => 'Öffentliche IP oder FQDN für das rote Interface oder <%defaultroute>',
 'vpn remote id' => 'Remote ID',
-'vpn subjectaltname' => 'Subjekt Alternativer Name',
-'vpn statistic rw' => 'OpenVPN-Roadwarrior-Statistik',
 'vpn statistic n2n' => 'OpenVPN-Netz-zu-Netz-Statistik',
+'vpn statistic rw' => 'OpenVPN-Roadwarrior-Statistik',
+'vpn subjectaltname' => 'Subjekt Alternativer Name',
 'vpn vhost' => 'Roadwarrior virtuelle IP (manchmal auch Inner-IP genannt)',
 'vpn watch' => 'Netz-zu-Netz VPN neu starten, wenn sich Remote-IP ändert (DynDNS).',
 'waiting to synchronize clock' => 'Bitte warten, die Uhr wird synchronisiert',
index 6a9a983bf9221c8add90ad81a808f7bf4f8547d5..174300e9dc8143e85cc703e998d72fbfd3d1e718 100644 (file)
 'vpn payload compression' => 'Negotiate payload compression',
 'vpn red name' => 'Public IP or FQDN for RED interface or <%defaultroute>',
 'vpn remote id' => 'Remote ID',
-'vpn statistic rw' => 'OpenVPN Roadwarrior Statistics',
 'vpn statistic n2n' => 'OpenVPN Net-to-Net Statistics',
+'vpn statistic rw' => 'OpenVPN Roadwarrior Statistics',
 'vpn subjectaltname' => 'Subject Alt Name',
 'vpn vhost' => 'Roadwarrior virtual IP (sometimes called Inner-IP)',
 'vpn watch' => 'Restart net-to-net vpn when remote peer IP changes (dyndns).',
index 6f9c0e51534c9ae0d614efb1847dd95ee959f0d2..1573e3874d718918914567e6de04b10b8473a3a8 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/make.sh b/make.sh
index 0326a90648b4e4361398c56f87502a484573851b..316917e0b3a938b49974e5c1043131455a9c6645 100755 (executable)
--- a/make.sh
+++ b/make.sh
@@ -17,7 +17,7 @@
 # along with IPFire; if not, write to the Free Software                    #
 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA #
 #                                                                          #
-# Copyright (C) 2007-2014 IPFire Team <info@ipfire.org>.                   #
+# Copyright (C) 2007-2015 IPFire Team <info@ipfire.org>.                   #
 #                                                                          #
 ############################################################################
 #
@@ -25,7 +25,7 @@
 NAME="IPFire"                                                  # Software name
 SNAME="ipfire"                                                 # Short name
 VERSION="2.17"                                                 # Version number
-CORE="89"                                                      # Core Level (Filename)
+CORE="90"                                                      # Core Level (Filename)
 PAKFIRE_CORE="89"                                              # Core Level (PAKFIRE)
 GIT_BRANCH=`git rev-parse --abbrev-ref HEAD`                   # Git Branch
 SLOGAN="www.ipfire.org"                                                # Software slogan
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..c258486
--- /dev/null
@@ -0,0 +1,64 @@
+diff --git a/src/openvpn.c b/src/openvpn.c
+index d446e9957b68..ef5bf1078285 100644
+--- a/src/openvpn.c
++++ b/src/openvpn.c
+@@ -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;
+       }
+-      return (read ? 0 : -1);
++      return 0;
+ } /* 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)
+               {