summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2020-05-21 18:44:43 +0200
committerChristian Poessinger <christian@poessinger.com>2020-05-21 18:44:43 +0200
commite7ebf1c54c26e281e9eebd78c7ab4884ffd0ee16 (patch)
treeee9ce3dbebaa0718842dcbb59dae96414ed60796
parent2c9bbd821d6cb6f9ea66435e5a2161e85c1b9350 (diff)
downloadvyos-1x-e7ebf1c54c26e281e9eebd78c7ab4884ffd0ee16.tar.gz
vyos-1x-e7ebf1c54c26e281e9eebd78c7ab4884ffd0ee16.zip
pppoe: wwan: T2488: drop individual ppp logs
-rw-r--r--op-mode-definitions/show-interfaces-pppoe.xml14
-rw-r--r--op-mode-definitions/show-interfaces-wirelessmodem.xml14
-rwxr-xr-xsrc/op_mode/connect_disconnect.py14
3 files changed, 0 insertions, 42 deletions
diff --git a/op-mode-definitions/show-interfaces-pppoe.xml b/op-mode-definitions/show-interfaces-pppoe.xml
index 211ad9808..f9903ee08 100644
--- a/op-mode-definitions/show-interfaces-pppoe.xml
+++ b/op-mode-definitions/show-interfaces-pppoe.xml
@@ -13,20 +13,6 @@
</properties>
<command>${vyos_op_scripts_dir}/show_interfaces.py --intf="$4"</command>
<children>
- <node name="log">
- <properties>
- <help>Show PPPoE logs</help>
- </properties>
- <command>cat /var/log/vyatta/ppp_$4.log</command>
- <children>
- <leafNode name="tail">
- <properties>
- <help>Watch PPPoE logs</help>
- </properties>
- <command>tail --follow=name /var/log/vyatta/ppp_$4.log</command>
- </leafNode>
- </children>
- </node>
<leafNode name="statistics">
<properties>
<help>Show specified wirelessmodem interface statistics</help>
diff --git a/op-mode-definitions/show-interfaces-wirelessmodem.xml b/op-mode-definitions/show-interfaces-wirelessmodem.xml
index c17efbc4e..d9690f521 100644
--- a/op-mode-definitions/show-interfaces-wirelessmodem.xml
+++ b/op-mode-definitions/show-interfaces-wirelessmodem.xml
@@ -13,20 +13,6 @@
</properties>
<command>${vyos_op_scripts_dir}/show_interfaces.py --intf="$4"</command>
<children>
- <node name="log">
- <properties>
- <help>Show PPPoE logs</help>
- </properties>
- <command>cat /var/log/vyatta/ppp_$4.log</command>
- <children>
- <leafNode name="tail">
- <properties>
- <help>Watch PPPoE logs</help>
- </properties>
- <command>tail --follow=name /var/log/vyatta/ppp_$4.log</command>
- </leafNode>
- </children>
- </node>
<leafNode name="statistics">
<properties>
<help>Show specified wirelessmodem interface statistics</help>
diff --git a/src/op_mode/connect_disconnect.py b/src/op_mode/connect_disconnect.py
index b191f630d..fa865f840 100755
--- a/src/op_mode/connect_disconnect.py
+++ b/src/op_mode/connect_disconnect.py
@@ -23,9 +23,6 @@ from time import strftime, localtime, time
from vyos.util import call
-
-PPP_LOGFILE = '/var/log/vyatta/ppp_{}.log'
-
def check_interface(interface):
if not os.path.isfile('/etc/ppp/peers/{}'.format(interface)):
print('Interface {}: invalid!'.format(interface))
@@ -55,12 +52,6 @@ def connect(interface):
print('Interface {}: connection is beeing established!'.format(interface))
else:
print('Interface {}: connecting...'.format(interface))
- user = os.environ['SUDO_USER']
- tm = strftime("%a %d %b %Y %I:%M:%S %p %Z", localtime(time()))
- with open(PPP_LOGFILE.format(interface), 'a') as f:
- f.write('{}: user {} started PPP daemon for {} by connect command\n'.format(tm, user, interface))
- call('umask 0; setsid sh -c "nohup /usr/sbin/pppd call {0} > /tmp/{0}.log 2>&1 &"'.format(interface))
-
def disconnect(interface):
"""
@@ -73,11 +64,6 @@ def disconnect(interface):
print('Interface {}: connection is already down'.format(interface))
else:
print('Interface {}: disconnecting...'.format(interface))
- user = os.environ['SUDO_USER']
- tm = strftime("%a %d %b %Y %I:%M:%S %p %Z", localtime(time()))
- with open(PPP_LOGFILE.format(interface), 'a') as f:
- f.write('{}: user {} stopped PPP daemon for {} by disconnect command\n'.format(tm, user, interface))
- call('/usr/bin/poff "{}"'.format(interface))
def main():
parser = argparse.ArgumentParser()