summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2020-08-02 18:24:19 +0200
committerChristian Poessinger <christian@poessinger.com>2020-08-02 18:24:21 +0200
commitf583fa94ba00d4c29abe997d316a381c98cc65bf (patch)
tree76bd57cc081c5758e1f332eedceef8effc68aeec
parentea10917897bb4478e7f6f576f2e1c42b134cc5c0 (diff)
downloadvyos-1x-f583fa94ba00d4c29abe997d316a381c98cc65bf.tar.gz
vyos-1x-f583fa94ba00d4c29abe997d316a381c98cc65bf.zip
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.
-rw-r--r--op-mode-definitions/show-interfaces-pppoe.xml2
-rw-r--r--op-mode-definitions/show-interfaces-wirelessmodem.xml2
2 files changed, 2 insertions, 2 deletions
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 @@
<path>interfaces pppoe</path>
</completionHelp>
</properties>
- <command>/usr/sbin/pppstats $4</command>
+ <command>if [ -d "/sys/class/net/$4" ]; then /usr/sbin/pppstats "$4"; fi</command>
</leafNode>
</children>
</tagNode>
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 @@
<path>interfaces wirelessmodem</path>
</completionHelp>
</properties>
- <command>/usr/sbin/pppstats $4</command>
+ <command>if [ -d "/sys/class/net/$4" ]; then /usr/sbin/pppstats "$4"; fi</command>
</leafNode>
</children>
</tagNode>