[./Python/etc/sysctl.conf] Oubli (merci maman :) )
darcs-hash:20091230153426-8fbb1-bdd881ba6c8fc0e08d739e2bed29d6d17df8e762.gz
This commit is contained in:
parent
d3cd1730e3
commit
51c1d20824
1 changed files with 49 additions and 0 deletions
49
Python/etc/sysctl.conf
Normal file
49
Python/etc/sysctl.conf
Normal file
|
@ -0,0 +1,49 @@
|
|||
# -*- coding: utf-8; mode: python -*-
|
||||
|
||||
info["owner"] = "root"
|
||||
info["group"] = "root"
|
||||
info["perms"] = 0644
|
||||
|
||||
template_ra="""
|
||||
net.ipv6.conf.%(If)s.autoconf = 0
|
||||
net.ipv6.conf.%(If)s.accept_ra = 0
|
||||
net.ipv6.conf.%(If)s.accept_ra_defrtr = 0
|
||||
net.ipv6.conf.%(If)s.accept_ra_rtr_pref = 0
|
||||
net.ipv6.conf.%(If)s.accept_ra_pinfo = 0
|
||||
net.ipv6.conf.%(If)s.accept_source_route = 0
|
||||
net.ipv6.conf.%(If)s.accept_redirects = 0
|
||||
"""
|
||||
|
||||
header("""
|
||||
Les modifications locales sont à mettre dans le fichier /etc/sysctl.local
|
||||
|
||||
Voir http://wiki.crans.org/CransTechnique/Bcfg2/... pour plus d'explications.
|
||||
""")
|
||||
|
||||
# Définitions communes
|
||||
print """
|
||||
net.ipv6.conf.default.autoconf = 0
|
||||
net.ipv6.conf.default.accept_ra = 0
|
||||
net.ipv6.conf.default.accept_ra_defrtr = 0
|
||||
net.ipv6.conf.default.accept_ra_rtr_pref = 0
|
||||
net.ipv6.conf.default.accept_ra_pinfo = 0
|
||||
net.ipv6.conf.default.accept_source_route = 0
|
||||
net.ipv6.conf.default.accept_redirects = 0
|
||||
net.ipv6.conf.all.autoconf = 0
|
||||
net.ipv6.conf.all.accept_ra = 0
|
||||
net.ipv6.conf.all.accept_ra_defrtr = 0
|
||||
net.ipv6.conf.all.accept_ra_rtr_pref = 0
|
||||
net.ipv6.conf.all.accept_ra_pinfo = 0
|
||||
net.ipv6.conf.all.accept_source_route = 0
|
||||
net.ipv6.conf.all.accept_redirects = 0
|
||||
"""
|
||||
|
||||
Probe_Ifs = metadata.Probes["mac"].split('\n')
|
||||
|
||||
Ifs = [Probe_Ifs[i] for i in range(len(Probe_Ifs)) if i % 2 == 0]
|
||||
|
||||
# Un '.' supplémentaire dans une clé sysctl, c'est mal.
|
||||
for i in Ifs:
|
||||
print template_ra % { 'If' : i.replace('.','/') }
|
||||
|
||||
print metadata.Probes["sysctl"]
|
Loading…
Add table
Add a link
Reference in a new issue