From b7c4c202f7f486576151fd0ca1084f8473b2552d Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Sun, 1 Dec 2019 13:20:50 +0100 Subject: pppoe: T1318: remove obsolete ipv6-up.d script The generated script was not called at all. Verified in vyOS 1.2.3 and rolling. Looks like a leftover from the past. If this functionality is required - it should be re-implemented the proper way! --- src/conf_mode/interfaces-pppoe.py | 25 ------------------------- 1 file changed, 25 deletions(-) (limited to 'src') diff --git a/src/conf_mode/interfaces-pppoe.py b/src/conf_mode/interfaces-pppoe.py index 219a40dbf..0fe4207a7 100755 --- a/src/conf_mode/interfaces-pppoe.py +++ b/src/conf_mode/interfaces-pppoe.py @@ -20,7 +20,6 @@ from sys import exit from copy import deepcopy from jinja2 import Template -from stat import S_IRUSR, S_IWUSR, S_IXUSR, S_IRGRP, S_IXGRP, S_IROTH, S_IXOTH from subprocess import Popen, PIPE from vyos.config import Config @@ -92,18 +91,6 @@ usepeerdns """ -config_pppoe_autoconf_tmpl = """ -#!/bin/sh - -if [ "$6" != "{{ intf }}" ]; then - exit -fi - -echo 0 > /proc/sys/net/ipv6/conf/$1/forwarding -echo 2 > /proc/sys/net/ipv6/conf/$1/accept_ra -echo 1 > /proc/sys/net/ipv6/conf/$1/autoconf -""" - default_config_data = { 'access_concentrator': '', 'on_demand': False, @@ -220,7 +207,6 @@ def verify(pppoe): def generate(pppoe): config_file_pppoe = '/etc/ppp/peers/{}'.format(pppoe['intf']) - config_file_ifup = '/etc/ppp/ipv6-up.d/50-vyos-{}-autoconf'.format(pppoe['intf']) # Always hang-up PPPoE connection prior generating new configuration file cmd = 'systemctl stop ppp@{}.service'.format(pppoe['intf']) @@ -231,9 +217,6 @@ def generate(pppoe): if os.path.exists(config_file_pppoe): os.unlink(config_file_pppoe) - if os.path.exists(config_file_ifup): - os.unlink(config_file_ifup) - else: # Create PPP configuration files tmpl = Template(config_pppoe_tmpl) @@ -241,14 +224,6 @@ def generate(pppoe): with open(config_file_pppoe, 'w') as f: f.write(config_text) - tmpl = Template(config_pppoe_autoconf_tmpl) - config_text = tmpl.render(pppoe) - with open(config_file_ifup, 'w') as f: - f.write(config_text) - - os.chmod(config_file_ifup, - S_IRUSR|S_IWUSR|S_IXUSR|S_IRGRP|S_IXGRP|S_IROTH|S_IXOTH) - return None def apply(pppoe): -- cgit v1.2.3