nectaris -> ragnarok
darcs-hash:20060205003258-d1718-74486509c1cd5ccff5480da8cf5cce872496b087.gz
This commit is contained in:
parent
d593a7111a
commit
b12f1b14b6
5 changed files with 14 additions and 14 deletions
|
@ -33,7 +33,7 @@ class dhcp(gen_config) :
|
||||||
base_conf = """option option-252 code 252 = text ;
|
base_conf = """option option-252 code 252 = text ;
|
||||||
option option-119 code 119 = text ;
|
option option-119 code 119 = text ;
|
||||||
"""
|
"""
|
||||||
elif hostname == 'nectaris' :
|
elif hostname == 'ragnarok' :
|
||||||
# On rajoute les IP dynamiques
|
# On rajoute les IP dynamiques
|
||||||
base_conf = """
|
base_conf = """
|
||||||
subnet 10.231.144.0 netmask 255.255.248.0 {
|
subnet 10.231.144.0 netmask 255.255.248.0 {
|
||||||
|
@ -60,7 +60,7 @@ option option-119 code 119 = text ;
|
||||||
option domain-name-servers 138.231.136.3, 138.231.136.10, 138.231.136.9;
|
option domain-name-servers 138.231.136.3, 138.231.136.10, 138.231.136.9;
|
||||||
option domain-name "crans.org";
|
option domain-name "crans.org";
|
||||||
option option-119 "crans.org wifi.crans.org";""" }
|
option option-119 "crans.org wifi.crans.org";""" }
|
||||||
elif hostname == 'nectaris':
|
elif hostname == 'ragnarok':
|
||||||
reseaux = { '138.231.148.0/22' :
|
reseaux = { '138.231.148.0/22' :
|
||||||
"""option routers 138.231.148.1;
|
"""option routers 138.231.148.1;
|
||||||
option domain-name-servers 138.231.148.1;
|
option domain-name-servers 138.231.148.1;
|
||||||
|
@ -110,7 +110,7 @@ subnet %(network)s netmask %(netmask)s {
|
||||||
|
|
||||||
if hostname == 'zamok':
|
if hostname == 'zamok':
|
||||||
restart_cmd = '/etc/init.d/dhcp restart'
|
restart_cmd = '/etc/init.d/dhcp restart'
|
||||||
elif hostname == 'nectaris':
|
elif hostname == 'ragnarok':
|
||||||
restart_cmd = 'kill $(ps auxwwc | awk \'($11 == "dhcpd") {print $2}\') ; sleep 1 ; dhcpd $(grep -v \'^#\' /etc/dhcpd.interfaces | tr \'\\n\' \' \')'
|
restart_cmd = 'kill $(ps auxwwc | awk \'($11 == "dhcpd") {print $2}\') ; sleep 1 ; dhcpd $(grep -v \'^#\' /etc/dhcpd.interfaces | tr \'\\n\' \' \')'
|
||||||
elif hostname == 'rouge' :
|
elif hostname == 'rouge' :
|
||||||
restart_cmd = '/etc/init.d/dhcp3-server restart'
|
restart_cmd = '/etc/init.d/dhcp3-server restart'
|
||||||
|
|
|
@ -204,7 +204,7 @@ class sila(base_reconfigure) :
|
||||||
from gen_confs.squid import squid_chbre
|
from gen_confs.squid import squid_chbre
|
||||||
self._do(squid_chbre())
|
self._do(squid_chbre())
|
||||||
|
|
||||||
class nectaris(base_reconfigure) :
|
class ragnarok(base_reconfigure) :
|
||||||
__restart_wifi_update = False
|
__restart_wifi_update = False
|
||||||
|
|
||||||
def macip(self) :
|
def macip(self) :
|
||||||
|
|
|
@ -422,7 +422,7 @@ clients_ipsec = None
|
||||||
def ipsec_ok(machine) :
|
def ipsec_ok(machine) :
|
||||||
"""Indique si une machine est correctement authentifiée"""
|
"""Indique si une machine est correctement authentifiée"""
|
||||||
prefix=""
|
prefix=""
|
||||||
if hostname != "nectaris":
|
if hostname != "ragnarok":
|
||||||
if not os.path.isfile("/usr/scripts/gestion/clef-encap"):
|
if not os.path.isfile("/usr/scripts/gestion/clef-encap"):
|
||||||
return None
|
return None
|
||||||
prefix = "ssh -i /usr/scripts/gestion/clef-encap root@nectaris.crans.org "
|
prefix = "ssh -i /usr/scripts/gestion/clef-encap root@nectaris.crans.org "
|
||||||
|
|
|
@ -9,7 +9,7 @@ import commands
|
||||||
host = commands.getoutput("hostname").split('.')[0]
|
host = commands.getoutput("hostname").split('.')[0]
|
||||||
|
|
||||||
# est ce que c'est un systeme bsd
|
# est ce que c'est un systeme bsd
|
||||||
if host in ['nectaris'] :
|
if host in ['ragnarok'] :
|
||||||
bsd = True
|
bsd = True
|
||||||
else :
|
else :
|
||||||
bsd = False
|
bsd = False
|
||||||
|
@ -171,8 +171,8 @@ def file_monitrc(hostname = host) :
|
||||||
config += ' if 3 restarts within 5 cycles then timeout\n'
|
config += ' if 3 restarts within 5 cycles then timeout\n'
|
||||||
config += '\n'
|
config += '\n'
|
||||||
|
|
||||||
# apache sur nectaris
|
# apache sur ragnarok
|
||||||
if hostname in ['nectaris'] :
|
if hostname in ['ragnarok'] :
|
||||||
config += '# apache\n'
|
config += '# apache\n'
|
||||||
config += 'check process apache with pidfile /var/www/logs/httpd.pid\n'
|
config += 'check process apache with pidfile /var/www/logs/httpd.pid\n'
|
||||||
config += ' start program = "/usr/sbin/apachectl start"\n'
|
config += ' start program = "/usr/sbin/apachectl start"\n'
|
||||||
|
@ -205,7 +205,7 @@ def file_monitrc(hostname = host) :
|
||||||
config += '\n'
|
config += '\n'
|
||||||
|
|
||||||
# bind
|
# bind
|
||||||
if hostname in ['nectaris'] and False :
|
if hostname in ['ragnarok'] and False :
|
||||||
config += '# bind\n'
|
config += '# bind\n'
|
||||||
config += 'check process bind with pidfile /var/run/named.pid\n'
|
config += 'check process bind with pidfile /var/run/named.pid\n'
|
||||||
config += ' start program = "???"\n'
|
config += ' start program = "???"\n'
|
||||||
|
@ -247,7 +247,7 @@ def file_monitrc(hostname = host) :
|
||||||
config += '\n'
|
config += '\n'
|
||||||
|
|
||||||
# dhcp
|
# dhcp
|
||||||
if hostname in ['nectaris'] :
|
if hostname in ['ragnarok'] :
|
||||||
pass
|
pass
|
||||||
|
|
||||||
# filtrage des logs :
|
# filtrage des logs :
|
||||||
|
@ -289,7 +289,7 @@ def file_monitrc(hostname = host) :
|
||||||
config += '\n'
|
config += '\n'
|
||||||
|
|
||||||
# isakmpd
|
# isakmpd
|
||||||
if hostname in ['nectaris'] :
|
if hostname in ['ragnarok'] :
|
||||||
config += '# isakmpd\n'
|
config += '# isakmpd\n'
|
||||||
config += 'check process isakmpd with pidfile /var/run/isakmpd.pid\n'
|
config += 'check process isakmpd with pidfile /var/run/isakmpd.pid\n'
|
||||||
config += ' start program = "/sbin/isakmpd -d"\n'
|
config += ' start program = "/sbin/isakmpd -d"\n'
|
||||||
|
@ -394,7 +394,7 @@ def file_monitrc(hostname = host) :
|
||||||
config += '\n'
|
config += '\n'
|
||||||
|
|
||||||
# rsync
|
# rsync
|
||||||
if hostname in ['nectaris'] and False :
|
if hostname in ['ragnarok'] and False :
|
||||||
config += '# rsyncd\n'
|
config += '# rsyncd\n'
|
||||||
config += 'check process rsyncd with pidfile /var/run/rsyncd.pid\n'
|
config += 'check process rsyncd with pidfile /var/run/rsyncd.pid\n'
|
||||||
config += ' start program = "???"\n'
|
config += ' start program = "???"\n'
|
||||||
|
|
|
@ -35,9 +35,9 @@ def HostStatus (host) :
|
||||||
|
|
||||||
f = open('%s/%s' % (statusfolder,host) )
|
f = open('%s/%s' % (statusfolder,host) )
|
||||||
|
|
||||||
# nectaris a un traitement spécial
|
# ragnarok a un traitement spécial
|
||||||
##################################
|
##################################
|
||||||
if host == 'nectaris' :
|
if host == 'ragnarok' :
|
||||||
for line in f.readlines()[2:] :
|
for line in f.readlines()[2:] :
|
||||||
# on éclate la ligne qui est au format :
|
# on éclate la ligne qui est au format :
|
||||||
# Device 'fs/' accessible
|
# Device 'fs/' accessible
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue