summaryrefslogtreecommitdiff
path: root/src/op_mode/connect_disconnect.py
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 /src/op_mode/connect_disconnect.py
parent2c9bbd821d6cb6f9ea66435e5a2161e85c1b9350 (diff)
downloadvyos-1x-e7ebf1c54c26e281e9eebd78c7ab4884ffd0ee16.tar.gz
vyos-1x-e7ebf1c54c26e281e9eebd78c7ab4884ffd0ee16.zip
pppoe: wwan: T2488: drop individual ppp logs
Diffstat (limited to 'src/op_mode/connect_disconnect.py')
-rwxr-xr-xsrc/op_mode/connect_disconnect.py14
1 files changed, 0 insertions, 14 deletions
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()