diff --git a/branches/ucs-3.2/ucs-3.2-0/base/univention-base-files/conffiles/etc/network/interfaces.d/10-default b/branches/ucs-3.2/ucs-3.2-0/base/univention-base-files/conffiles/etc/network/interfaces.d/10-default index 44bdbdb..ea685ba 100644 --- a/branches/ucs-3.2/ucs-3.2-0/base/univention-base-files/conffiles/etc/network/interfaces.d/10-default +++ b/branches/ucs-3.2/ucs-3.2-0/base/univention-base-files/conffiles/etc/network/interfaces.d/10-default @@ -2,6 +2,10 @@ from univention.config_registry.interfaces import Interfaces from itertools import groupby from operator import itemgetter +try: + from shlex import quote +except ImportError: + from pipes import quote def auto(interface, start): """Print 'auto iface' statements only once.""" @@ -61,7 +65,7 @@ def ipv4(ucr, interfaces): for value in iface.options: print '\t%s' % (value,) -def ipv6(interfaces): +def ipv6(ucr, interfaces): """Setup IPv6.""" gateway = interfaces.ipv6_gateway if gateway is False: @@ -104,6 +108,8 @@ def ipv6(interfaces): if i == 0: # first print '\taddress %s' % (addr.ip,) print '\tnetmask %s' % (addr.prefixlen,) + if ucr.is_false(value=iface.get('ipv6/acceptRA')): + print '\tup sysctl -w net.ipv6.conf.%s.accept_ra=0' % (quote(iface.name),) else: print '\tup ip -6 addr add %s dev %s' % (addr.ip, iface.name) print '\tdown ip -6 addr del %s dev %s' % (addr.ip, iface.name) @@ -129,7 +135,7 @@ def main(): """Create configured interfaces.""" interfaces = Interfaces(configRegistry) ipv4(configRegistry, interfaces) - ipv6(interfaces) + ipv6(configRegistry, interfaces) main() # vim:set sw=4 ts=4 noet: diff --git a/branches/ucs-3.2/ucs-3.2-0/base/univention-base-files/conffiles/etc/sysctl.d/local.conf b/branches/ucs-3.2/ucs-3.2-0/base/univention-base-files/conffiles/etc/sysctl.d/local.conf index 4a1c830..fcf68a1 100644 --- a/branches/ucs-3.2/ucs-3.2-0/base/univention-base-files/conffiles/etc/sysctl.d/local.conf +++ b/branches/ucs-3.2/ucs-3.2-0/base/univention-base-files/conffiles/etc/sysctl.d/local.conf @@ -1,16 +1,5 @@ @%@UCRWARNING=# @%@ @!@ -import re -RE_ACCEPT = re.compile(r'^interfaces/([^/]+)/ipv6/acceptRA') -# UCRV format: interfaces/$DEVICE/ipv6/acceptRA -# 0 1 2 3 -for key in configRegistry: - match = RE_ACCEPT.match(key) - if match: - (iface,) = match.groups() - if configRegistry.is_false(key): - print 'net.ipv6.conf.%s.accept_ra = 0' % (iface,) - if configRegistry.get('kernel/fs/inotify/max_user_instances'): print 'fs.inotify.max_user_instances=%s' % configRegistry.get('kernel/fs/inotify/max_user_instances') if configRegistry.get('kernel/fs/inotify/max_user_watches'):