From f583fa94ba00d4c29abe997d316a381c98cc65bf Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Sun, 2 Aug 2020 18:24:19 +0200 Subject: wwan: pppoe: op-mode: T2488: only call pppstats when interface is up Without this check an error will be shown: pppstats: nonexistent interface 'pppoe0' specified. --- op-mode-definitions/show-interfaces-pppoe.xml | 2 +- op-mode-definitions/show-interfaces-wirelessmodem.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'op-mode-definitions') diff --git a/op-mode-definitions/show-interfaces-pppoe.xml b/op-mode-definitions/show-interfaces-pppoe.xml index 4263a2f0a..393ca912f 100644 --- a/op-mode-definitions/show-interfaces-pppoe.xml +++ b/op-mode-definitions/show-interfaces-pppoe.xml @@ -26,7 +26,7 @@ interfaces pppoe - /usr/sbin/pppstats $4 + if [ -d "/sys/class/net/$4" ]; then /usr/sbin/pppstats "$4"; fi diff --git a/op-mode-definitions/show-interfaces-wirelessmodem.xml b/op-mode-definitions/show-interfaces-wirelessmodem.xml index 46f872c85..c0ab9c66f 100644 --- a/op-mode-definitions/show-interfaces-wirelessmodem.xml +++ b/op-mode-definitions/show-interfaces-wirelessmodem.xml @@ -26,7 +26,7 @@ interfaces wirelessmodem - /usr/sbin/pppstats $4 + if [ -d "/sys/class/net/$4" ]; then /usr/sbin/pppstats "$4"; fi -- cgit v1.2.3