Index: tareas_puppet/servidores_aula/squeeze/ltsp_squid.tgz
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: tareas_puppet/servidores_aula/squeeze/ltsp_squid/LEEME
===================================================================
--- tareas_puppet/servidores_aula/squeeze/ltsp_squid/LEEME	(revision 446)
+++ tareas_puppet/servidores_aula/squeeze/ltsp_squid/LEEME	(revision 447)
@@ -34,3 +34,16 @@
 Francisco Rodrigo López
 Administrador informático del IES Javier García Téllez.
 14-Noviembre-2012
+
+Esteban M. Navas Martín
+Administrador informático del IES Valle del Jerte.
+12-Diciembre-2012
+
+# Revisado: Esteban M. Navas Martín
+# Fecha: 12/12/2012
+# Corregido bug en script proxys_intermedios.sh para que busque el comienzo del nombre del servidor LTSP y
+  evitar que falle cuando el nombre de un equipo sea parte del de otro. 
+  Se producía un error cuando había equipos con nombres: a01-pro dlengua01-pro, a02-pro dmatematicas02-pro...
+# Modificada la tarea para que se reinicie squid cuando se modifiquen los archivos /etc/squid/squid.conf",
+  "/etc/squid/squid-cache.conf","/etc/squid/squid-cache-refresh.conf","/etc/squid/proxys_intermedios.sh"
+
Index: tareas_puppet/servidores_aula/squeeze/ltsp_squid/manifests/init.pp
===================================================================
--- tareas_puppet/servidores_aula/squeeze/ltsp_squid/manifests/init.pp	(revision 446)
+++ tareas_puppet/servidores_aula/squeeze/ltsp_squid/manifests/init.pp	(revision 447)
@@ -50,35 +50,35 @@
 
    exec { "configurar-squid":
 	path => "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
-	command => "update-rc.d -f squid remove; insserv squid",
+	command => "update-rc.d -f squid remove && insserv squid",
 	require => File["/etc/init.d/squid"],
-     	unless => "ls /etc/rc2.d/S01squid",
+     	unless => "test -L /etc/rc2.d/S??squid",
    }
 
    exec { "denegar-https":
 	path => "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
-	command => "update-rc.d -f deny_https_iptables remove; insserv deny_https_iptables",
+	command => "update-rc.d -f deny_https_iptables remove && insserv deny_https_iptables",
 	require => File["/etc/network/iptables","/etc/init.d/deny_https_iptables"],
-     	unless => "ls /etc/rc2.d/S19deny_https_iptables",
+     	unless => "test -L /etc/rc2.d/S??deny_https_iptables",
    }
 
    exec { "configurar-proxy":
 	path => "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
-	command => "update-rc.d -f enable-local-proxy remove; insserv enable-local-proxy",
+	command => "update-rc.d -f enable-local-proxy remove && insserv enable-local-proxy",
 	require => File["/etc/init.d/enable-local-proxy"],
-     	unless => "ls /etc/rc2.d/S23enable-local-proxy",
+     	unless => "test -L /etc/rc2.d/S??enable-local-proxy",
    }
 
    exec { "configurar-nat":
 	path => "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
-	command => "update-rc.d -f enable-nat remove; insserv enable-nat",
+	command => "update-rc.d -f enable-nat remove && insserv enable-nat",
 	require => File["/etc/init.d/enable-nat"],
-     	unless => "ls /etc/rc2.d/S25enable-nat",
+     	unless => "test -L /etc/rc2.d/S??enable-nat",
    }
 
    exec { "instalar-sarg-squid-apache2":
 	path => "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
-	command => "apt-get update; dpkg --configure -a; apt-get -yf --force-yes install squid sarg apache2",
+	command => "apt-get update && dpkg --configure -a && apt-get -yf --force-yes install squid sarg apache2",
 	require => File["/etc/apt/sources.list.d/backports.list"],
 	unless => "test `dpkg -l | egrep 'apache2 | squid | sarg' | grep ii | wc -l` -eq 3",
    }
@@ -181,7 +181,7 @@
 	command => "/etc/squid/proxys_intermedios.sh",
 	require => [ Exec["instalar-sarg-squid-apache2"], File["/etc/squid/proxys_intermedios.sh"] ],
 	before => Exec["reiniciar-squid"],
-	unless => "ls /etc/squid/proxys_intermedios.conf",
+	creates => "/etc/squid/proxys_intermedios.conf",
    }
 
    exec { "reiniciar-cron":
@@ -193,8 +193,9 @@
 
    exec { "reiniciar-squid":
 	path => "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
-	command => "/etc/init.d/squid restart;/etc/init.d/deny_https_iptables restart;/etc/init.d/enable-local-proxy restart;/etc/init.d/enable-nat restart",
+	command => "/etc/init.d/squid restart && /etc/init.d/deny_https_iptables restart && /etc/init.d/enable-local-proxy restart && /etc/init.d/enable-nat restart",
 	require => File["/etc/squid/squid.conf","/etc/squid/squid-cache.conf","/etc/squid/squid-cache-refresh.conf"],
+	subscribe => File["/etc/squid/squid.conf","/etc/squid/squid-cache.conf","/etc/squid/squid-cache-refresh.conf","/etc/squid/proxys_intermedios.sh"],
 	refreshonly => true,
    }
 
Index: tareas_puppet/servidores_aula/squeeze/ltsp_squid/files/proxys_intermedios.sh
===================================================================
--- tareas_puppet/servidores_aula/squeeze/ltsp_squid/files/proxys_intermedios.sh	(revision 446)
+++ tareas_puppet/servidores_aula/squeeze/ltsp_squid/files/proxys_intermedios.sh	(revision 447)
@@ -3,7 +3,14 @@
 # Copyright (c) 2010 - Antonio J. Abasolo Sierra
 # Fecha: Abril-2010. Ultima rev.: Abril-2010
 #----------------------------------------------------------
-
+#
+# Revisado: Esteban M. Navas Martín
+# Fecha: 12/12/2012
+# Corregido bug poara que busque el comienzo del nombre del servidor LTSP:
+# ipLTSP=`grep ^$LTSP /tmp/ListaPcs | cut -f2 -d,`
+# Evitamos que el script falle cuando el nombre de un equipo sea parte del de otro. 
+# Se producíaun error cuando hab�a equipos con nombres: a01-pro dlengua01-pro, a02-pro dmatematicas02-pro...
+#
 # VARIABLES --------------------------------------------------------------------------------
 DN="dc=instituto,dc=extremadura,dc=es"
 BASESEARCH=" -xLLL -h ldap -b "
@@ -39,7 +46,7 @@
 
 ldapsearch $BASESEARCH ou=Netgroup,$DN "(cn=ltsp-server-hosts)" | grep nisNetgroupTriple | cut -f2 -d'(' | cut -f1 -d',' > /tmp/ListaLTSP
 grep -vw `hostname|cut -f1 -d.` /tmp/ListaLTSP | sort | while read LTSP ; do
-  ipLTSP=`grep $LTSP /tmp/ListaPcs | cut -f2 -d,`
+  ipLTSP=`grep ^$LTSP /tmp/ListaPcs | cut -f2 -d,`
   echo "#Servidor de Aula: $LTSP" >> $FICHERO
   echo "cache_peer $ipLTSP sibling 80 3130 proxy-only" >> $FICHERO
 done
Index: tareas_puppet/servidores_aula/squeeze/ltsp_squid/files/backports.list
===================================================================
--- tareas_puppet/servidores_aula/squeeze/ltsp_squid/files/backports.list	(revision 446)
+++ tareas_puppet/servidores_aula/squeeze/ltsp_squid/files/backports.list	(revision 447)
@@ -1 +1 @@
-deb http://backports.debian.org/debian-backports squeeze-backports main
+deb http://ldap/debian-backports squeeze-backports main
