vnstat2: fix all interfaces being monitored when none are configured
authorJan Hoffmann <jan@3e8.eu>
Thu, 21 Oct 2021 21:38:58 +0000 (23:38 +0200)
committerJosef Schlehofer <pepe.schlehofer@gmail.com>
Fri, 18 Feb 2022 22:25:49 +0000 (23:25 +0100)
commitf8820d2aeb650d215035e87fd59acc0020bbe12c
treeb04a7b1f03565499fcef0946303b62dbafa299ca
parent86f85cde4f1d5f5941bc6c3b4e11e7d530729bd4
vnstat2: fix all interfaces being monitored when none are configured

By default, vnstatd adds all available interfaces on startup when its
database is empty. The --noadd option prevents this, but it breaks
import of legacy databases, and causes vnstatd to exit immediately
after startup, which breaks reloading.

This changes the init script to add the --noadd option when no legacy
databases need to be imported, and patches vnstatd to keep running
even when no interfaces are configured.

Signed-off-by: Jan Hoffmann <jan@3e8.eu>
(cherry picked from commit ecae7dedde0ccd2a636e93620ced41bca807d405)
net/vnstat2/Makefile
net/vnstat2/files/vnstat.init
net/vnstat2/patches/100-noexit.patch [new file with mode: 0644]