From e7ebf1c54c26e281e9eebd78c7ab4884ffd0ee16 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Thu, 21 May 2020 18:44:43 +0200 Subject: pppoe: wwan: T2488: drop individual ppp logs --- op-mode-definitions/show-interfaces-pppoe.xml | 14 -------------- op-mode-definitions/show-interfaces-wirelessmodem.xml | 14 -------------- src/op_mode/connect_disconnect.py | 14 -------------- 3 files changed, 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 @@ ${vyos_op_scripts_dir}/show_interfaces.py --intf="$4" - - - Show PPPoE logs - - cat /var/log/vyatta/ppp_$4.log - - - - Watch PPPoE logs - - tail --follow=name /var/log/vyatta/ppp_$4.log - - - Show specified wirelessmodem interface statistics 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 @@ ${vyos_op_scripts_dir}/show_interfaces.py --intf="$4" - - - Show PPPoE logs - - cat /var/log/vyatta/ppp_$4.log - - - - Watch PPPoE logs - - tail --follow=name /var/log/vyatta/ppp_$4.log - - - Show specified wirelessmodem interface statistics 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() -- cgit v1.2.3