diff options
author | Christian Poessinger <christian@poessinger.com> | 2020-04-10 18:48:01 +0200 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2020-04-11 11:25:13 +0200 |
commit | 0adecf6c79c0de37a705cb0b035e7ab8a24cd09c (patch) | |
tree | 0c32a32c580d318fcdfcb8604b572f8993ded161 | |
parent | 3217abf039388465558c8cf8a6d29dda2c58189d (diff) | |
download | vyos-1x-0adecf6c79c0de37a705cb0b035e7ab8a24cd09c.tar.gz vyos-1x-0adecf6c79c0de37a705cb0b035e7ab8a24cd09c.zip |
vpn: l2tp: T2264: comment cleanup on chk_con()
-rwxr-xr-x | src/conf_mode/vpn_l2tp.py | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/src/conf_mode/vpn_l2tp.py b/src/conf_mode/vpn_l2tp.py index b5ad1c3c0..d5274a6bc 100755 --- a/src/conf_mode/vpn_l2tp.py +++ b/src/conf_mode/vpn_l2tp.py @@ -34,7 +34,7 @@ pidfile = r'/var/run/accel_l2tp.pid' l2tp_cnf_dir = r'/etc/accel-ppp/l2tp' chap_secrets = l2tp_cnf_dir + '/chap-secrets' l2tp_conf = l2tp_cnf_dir + '/l2tp.config' -# accel-pppd -d -c /etc/accel-ppp/l2tp/l2tp.config -p /var/run/accel_l2tp.pid + # config path creation if not os.path.exists(l2tp_cnf_dir): @@ -65,16 +65,12 @@ default_config_data = { 'ppp_options': {}, } -### -# inline helper functions -### -# depending on hw and threads, daemon needs a little to start -# if it takes longer than 100 * 0.5 secs, exception is being raised -# not sure if that's the best way to check it, but it worked so far quite well -### - - def chk_con(): + """ + Depending on hardware and threads, daemon needs a little to start if it + takes longer than 100 * 0.5 secs, exception is being raised not sure if + that's the best way to check it, but it worked so far quite well + """ cnt = 0 s = socket(AF_INET, SOCK_STREAM) while True: @@ -92,10 +88,6 @@ def chk_con(): def _accel_cmd(command): return run(f'/usr/bin/accel-cmd -p 2004 {command}') -### -# inline helper functions end -### - def get_config(): c = Config() |