View | Details | Raw Unified | Return to bug 33954 | Differences between
and this patch

Collapse All | Expand All

(-)a/branches/ucs-3.2/ucs-3.2-0/base/univention-base-files/conffiles/etc/network/interfaces.d/10-default (-2 / +8 lines)
 Lines 2-7    Link Here 
2
from univention.config_registry.interfaces import Interfaces
2
from univention.config_registry.interfaces import Interfaces
3
from itertools import groupby
3
from itertools import groupby
4
from operator import itemgetter
4
from operator import itemgetter
5
try:
6
	from shlex import quote
7
except ImportError:
8
	from pipes import quote
5
9
6
def auto(interface, start):
10
def auto(interface, start):
7
	"""Print 'auto iface' statements only once."""
11
	"""Print 'auto iface' statements only once."""
 Lines 61-67   def ipv4(ucr, interfaces): Link Here 
61
		for value in iface.options:
65
		for value in iface.options:
62
			print '\t%s' % (value,)
66
			print '\t%s' % (value,)
63
67
64
def ipv6(interfaces):
68
def ipv6(ucr, interfaces):
65
	"""Setup IPv6."""
69
	"""Setup IPv6."""
66
	gateway = interfaces.ipv6_gateway
70
	gateway = interfaces.ipv6_gateway
67
	if gateway is False:
71
	if gateway is False:
 Lines 104-109   def ipv6(interfaces): Link Here 
104
			if i == 0:  # first
108
			if i == 0:  # first
105
				print '\taddress %s' % (addr.ip,)
109
				print '\taddress %s' % (addr.ip,)
106
				print '\tnetmask %s' % (addr.prefixlen,)
110
				print '\tnetmask %s' % (addr.prefixlen,)
111
				if ucr.is_false(value=iface.get('ipv6/acceptRA')):
112
					print '\tup   sysctl -q -w net.ipv6.conf.%s.accept_ra=0' % (quote(iface.name),)
107
			else:
113
			else:
108
				print '\tup   ip -6 addr add %s dev %s' % (addr.ip, iface.name)
114
				print '\tup   ip -6 addr add %s dev %s' % (addr.ip, iface.name)
109
				print '\tdown ip -6 addr del %s dev %s' % (addr.ip, iface.name)
115
				print '\tdown ip -6 addr del %s dev %s' % (addr.ip, iface.name)
 Lines 129-135   def main(): Link Here 
129
	"""Create configured interfaces."""
135
	"""Create configured interfaces."""
130
	interfaces = Interfaces(configRegistry)
136
	interfaces = Interfaces(configRegistry)
131
	ipv4(configRegistry, interfaces)
137
	ipv4(configRegistry, interfaces)
132
	ipv6(interfaces)
138
	ipv6(configRegistry, interfaces)
133
139
134
main()
140
main()
135
# vim:set sw=4 ts=4 noet:
141
# vim:set sw=4 ts=4 noet:
(-)a/branches/ucs-3.2/ucs-3.2-0/base/univention-base-files/conffiles/etc/sysctl.d/local.conf (-11 lines)
 Lines 1-16    Link Here 
1
@%@UCRWARNING=# @%@
1
@%@UCRWARNING=# @%@
2
@!@
2
@!@
3
import re
4
RE_ACCEPT = re.compile(r'^interfaces/([^/]+)/ipv6/acceptRA')
5
# UCRV format: interfaces/$DEVICE/ipv6/acceptRA
6
#                   0        1      2     3
7
for key in configRegistry:
8
	match = RE_ACCEPT.match(key)
9
	if match:
10
		(iface,) = match.groups()
11
		if configRegistry.is_false(key):
12
			print 'net.ipv6.conf.%s.accept_ra = 0' % (iface,)
13
14
if configRegistry.get('kernel/fs/inotify/max_user_instances'):
3
if configRegistry.get('kernel/fs/inotify/max_user_instances'):
15
	print 'fs.inotify.max_user_instances=%s' % configRegistry.get('kernel/fs/inotify/max_user_instances')
4
	print 'fs.inotify.max_user_instances=%s' % configRegistry.get('kernel/fs/inotify/max_user_instances')
16
if configRegistry.get('kernel/fs/inotify/max_user_watches'):
5
if configRegistry.get('kernel/fs/inotify/max_user_watches'):

Return to bug 33954