]> git.ipfire.org Git - people/mfischer/ipfire-2.x.git/commitdiff
Deleted 'vnstat' calls in initscripts - those options were removed and we're using...
authorMatthias Fischer <matthias.fischer@ipfire.org>
Thu, 7 Apr 2022 16:46:54 +0000 (18:46 +0200)
committerPeter Müller <peter.mueller@ipfire.org>
Sun, 10 Apr 2022 09:53:49 +0000 (09:53 +0000)
Fixes: 12831
Jonatan Schlag reported that the command line options of 'vnstat' had changed
"...and seemed to be broken a long time".
=> https://bugzilla.ipfire.org/show_bug.cgi?id=12831#c0

Several command line switches used in networking initscripts were obviously removed.

Affected commands in '.../networking/any' and '.../networking/red'):

...
/usr/bin/vnstat -u -i ${DEVICE} -r --enable --force > /dev/null 2>&1
...
/usr/bin/vnstat -u -i ${DEVICE} -r --disable > /dev/null 2>&1
...

and
...
/usr/bin/vnstat -u -i ppp0 -r --disable > /dev/null 2>&1
...

Adolf Belka tested this, "looked through the changelogs" and found - besides that
the switch '--enable' had been removed "in version 2.0 in 2018" - that '--enable', '--update'
and '--reset' switches are either not needed or not supported anymore.
"The old man page indicates that none of those options are used when the vnstat daemon
is running."

Since we only start and run 'vnstatd' in IPFire it was decided to remove these commands.

Reported-by: jonatan.schlag <jonatan.schlag@ipfire.org>
Tested-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Matthias Fischer <matthias.fischer@ipfire.org>
src/initscripts/networking/any
src/initscripts/networking/red

index 0facf23d890264850e87c434e1ef2684ffcf3990..15197badb76664acd95511c0b479194b2e67aa28 100644 (file)
@@ -83,9 +83,6 @@ case "${1}" in
                        fi
                fi
 
-               # Create & Enable vnstat data collection
-               /usr/bin/vnstat -u -i ${DEVICE} -r --enable --force > /dev/null 2>&1
-
                if [ ! "${ADDRESS}" == "1.1.1.1" ]; then
                        boot_mesg "Adding IPv4 address ${ADDRESS} to the ${DEVICE} interface..."
                        ip addr add ${args} dev ${DEVICE}
@@ -100,8 +97,6 @@ case "${1}" in
                        evaluate_retval
                fi
 
-               # Disable vnstat collection
-               /usr/bin/vnstat -u -i ${DEVICE} -r --disable > /dev/null 2>&1
                exit 0;
                ;;
 esac
index 38129deeb10e47451bd81d0fe55a2782de737d6b..fc10e077abce37ef6af0bb4dbe40e362c3656e50 100644 (file)
@@ -103,9 +103,6 @@ case "${1}" in
                        fi
                fi
 
-               ## Create & Enable vnstat
-               /usr/bin/vnstat -u -i ${DEVICE} -r --enable --force > /dev/null 2>&1
-
                if [ "${TYPE}" == "STATIC" ]; then
                        # Set the MTU
                        if [ -n "${MTU}" ]; then
@@ -176,9 +173,6 @@ case "${1}" in
                                dhcpcd_start "${DEVICE}"
                        fi
 
-                       ## Create & Enable vnstat
-                       /usr/bin/vnstat -u -i ${DEVICE} -r --enable --force > /dev/null 2>&1
-
                elif [ "$TYPE" == "PPPOE" ]; then
 
                        if ( ps ax | grep -q [p]ppd ); then 
@@ -459,8 +453,7 @@ case "${1}" in
                                evaluate_retval
                                # echo PPP: /usr/sbin/pppd pty "$PPPOE_CMD" $PPP_STD_OPTIONS $DEBUG $DEMAND $PPPD_SYNC
                        fi
-                       ## Create & Enable vnstat
-                       /usr/bin/vnstat -u -i ppp0 -r --enable --force > /dev/null 2>&1
+
                        /etc/rc.d/init.d/connectd start
                        # Add a NaN value to ppp0 rrd to supress spikes at reconnect
                        rrdtool update $RRDLOG/collectd/localhost/interface/if_octets-ppp0.rrd \
@@ -485,8 +478,6 @@ case "${1}" in
 
                elif [ "$TYPE" == "PPPOE" ]; then
                        boot_mesg "Bringing down the PPP interface ..."
-                       ## Disable vnstat collection
-                       /usr/bin/vnstat -u -i ppp0 -r --disable > /dev/null 2>&1
                        rm -f /var/ipfire/red/keepconnected
                        killall -w -s TERM /usr/sbin/pppd 2>/dev/null
                        evaluate_retval
@@ -533,9 +524,6 @@ case "${1}" in
                killall -w -s KILL pptp >/dev/null 2>&1
                killall -w -s KILL br2684ctl >/dev/null 2>&1
 
-               ## Disable vnstat collection
-               /usr/bin/vnstat -u -i ${DEVICE} -r --disable > /dev/null 2>&1
-
                exit 0;
                ;;
 esac