Changeset 6028


Ignore:
Timestamp:
Oct 13, 2017, 12:16:38 PM (3 years ago)
Author:
kbut
Message:

update from upstream

File:
1 edited

Legend:

Unmodified
Added
Removed
  • python-llxnet/trunk/fuentes/src/lliurex/interfacesparser.py

    r6016 r6028  
    296296        def write_file(self, path):
    297297                output = open(path, 'w')
    298                 output.write(self.print_file)
     298                output.write(self.print_file())
    299299                output.close()
    300300
     
    469469        def enable_forwarding_ipv4(self,persistent=False):
    470470                if (persistent):
    471                         self.change_option_sysctl('/etc/sysctl.d/10-lliurex-forwarding.conf','net.ipv4.ip_forward','net.ipv4.ip_forward=1')
     471                        self.change_option_sysctl('/etc/sysctl.d/network-parser-forwarding.conf','net.ipv4.ip_forward','net.ipv4.ip_forward=1')
    472472                f = open('/proc/sys/net/ipv4/ip_forward','w')
    473473                f.write('1')
     
    476476        def disable_forwarding_ipv4(self,persistent=False):
    477477                if (persistent):
    478                         self.change_option_sysctl('/etc/sysctl.d/10-lliurex-forwarding.conf','net.ipv4.ip_forward','net.ipv4.ip_forward=0')
     478                        self.change_option_sysctl('/etc/sysctl.d/network-parser-forwarding.conf','net.ipv4.ip_forward','net.ipv4.ip_forward=0')
    479479                f = open('/proc/sys/net/ipv4/ip_forward','w')
    480480                f.write('0')
     
    483483        def enable_forwarding_ipv6(self,persistent=False):
    484484                if (persistent):
    485                         self.change_option_sysctl('/etc/sysctl.d/10-lliurex-forwarding.conf','net.ipv6.conf.all.forwarding','net.ipv6.conf.all.forwarding=1')
     485                        self.change_option_sysctl('/etc/sysctl.d/network-parser-forwarding.conf','net.ipv6.conf.all.forwarding','net.ipv6.conf.all.forwarding=1')
    486486                f = open('/proc/sys/net/ipv6/conf/all/forwarding','w')
    487487                f.write('1')
     
    490490        def disable_forwarding_ipv6(self,persistent=False):
    491491                if (persistent):
    492                         self.change_option_sysctl('/etc/sysctl.d/10-lliurex-forwarding.conf','net.ipv6.conf.all.forwarding','net.ipv6.conf.all.forwarding=0')
     492                        self.change_option_sysctl('/etc/sysctl.d/network-parser-forwarding.conf','net.ipv6.conf.all.forwarding','net.ipv6.conf.all.forwarding=0')
    493493                f = open('/proc/sys/net/ipv6/conf/all/forwarding','w')
    494494                f.write('0')
     
    572572                        raise Exception("Type not supported")
    573573                try:
    574                         f = open('/etc/sysctl.d/10-lliurex-forwarding.conf','r')
     574                        f = open('/etc/sysctl.d/network-parser-forwarding.conf','r')
    575575                except :
    576576                        return False
Note: See TracChangeset for help on using the changeset viewer.