Index: tareas_puppet/portatiles/comunes/wifi_mac/changelog
===================================================================
--- tareas_puppet/portatiles/comunes/wifi_mac/changelog	(nonexistent)
+++ tareas_puppet/portatiles/comunes/wifi_mac/changelog	(revision 509)
@@ -0,0 +1 @@
+10/12/12 Release incial

Property changes on: tareas_puppet/portatiles/comunes/wifi_mac/changelog
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: tareas_puppet/portatiles/comunes/wifi_mac/manifests/init.pp
===================================================================
--- tareas_puppet/portatiles/comunes/wifi_mac/manifests/init.pp	(nonexistent)
+++ tareas_puppet/portatiles/comunes/wifi_mac/manifests/init.pp	(revision 509)
@@ -0,0 +1,8 @@
+class wifi_mac {
+  file { 
+  	"/etc/network/if-pre-up.d/wifi_mac":
+	   owner => root, group => root, mode => 755,
+	   source => "puppet:///modules/wifi_mac/wifi_mac",
+        }
+}
+

Property changes on: tareas_puppet/portatiles/comunes/wifi_mac/manifests/init.pp
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: tareas_puppet/portatiles/comunes/wifi_mac/files/wifi_mac
===================================================================
--- tareas_puppet/portatiles/comunes/wifi_mac/files/wifi_mac	(nonexistent)
+++ tareas_puppet/portatiles/comunes/wifi_mac/files/wifi_mac	(revision 509)
@@ -0,0 +1,22 @@
+#!/bin/bash
+# Antonio J. Abasolo Sierra (Dic-2012)
+# Asocia la mac wifi con la mac eth0, para que se conecte siempre con la misma MAC
+# Util para los portátiles de profesores, para no tener que darlos de alta 2 veces en LDAP
+# Se debe colocar el script en la ruta: /etc/network/if-pre-up.d/
+#. -------------------------------------------------------------------------------------------
+
+RED_ETH=eth0
+RED_WIFI=wlan0
+FILE_RULES=/etc/udev/rules.d/70-persistent-net.rules
+
+MAC_ETH=`ifconfig $RED_ETH | grep HW | awk '{print $5}'`
+MAC_WIFI=`ifconfig $RED_WIFI | grep HW | awk '{print $5}'`
+
+if [ -z $MAC_WIFI]; then
+  MAC_WIFI=`cat $FILE_RULES | grep $RED_WIFI | cut -f4 -d, | cut -f2 -d'"'`
+fi
+
+ifconfig $RED_WIFI down
+ifconfig $RED_WIFI hw ether $MAC_ETH
+ifconfig $RED_WIFI up
+

Property changes on: tareas_puppet/portatiles/comunes/wifi_mac/files/wifi_mac
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: tareas_puppet/portatiles/comunes/wifi_mac/files/wifi_mac2
===================================================================
--- tareas_puppet/portatiles/comunes/wifi_mac/files/wifi_mac2	(nonexistent)
+++ tareas_puppet/portatiles/comunes/wifi_mac/files/wifi_mac2	(revision 509)
@@ -0,0 +1,18 @@
+#!/bin/bash
+# Antonio J. Abasolo Sierra (Dic-2012)
+# Asocia la mac wifi con la mac eth0, para que se conecte siempre con la misma MAC
+# Util para los portátiles de profesores, para no tener que darlos de alta 2 veces en LDAP
+# Se debe colocar el script en la ruta: /etc/network/if-pre-up.d/
+#. -------------------------------------------------------------------------------------------
+
+RED_ETH=eth0
+RED_WIFI=wlan0
+FILE_RULES=/etc/udev/rules.d/70-persistent-net.rules
+
+MAC_ETH=`cat $FILE_RULES | grep $RED_ETH | cut -f4 -d, | cut -f2 -d'"'`
+MAC_WIFI=`cat $FILE_RULES | grep $RED_WIFI | cut -f4 -d, | cut -f2 -d'"'`
+
+ifconfig $RED_WIFI down
+ifconfig $RED_WIFI hw ether $MAC_ETH
+ifconfig $RED_WIFI up
+

Property changes on: tareas_puppet/portatiles/comunes/wifi_mac/files/wifi_mac2
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: tareas_puppet/portatiles/comunes/wifi_mac/leeme.txt
===================================================================
--- tareas_puppet/portatiles/comunes/wifi_mac/leeme.txt	(nonexistent)
+++ tareas_puppet/portatiles/comunes/wifi_mac/leeme.txt	(revision 509)
@@ -0,0 +1,15 @@
+wifi_mac
+
+* Tarea de puppet:
+  - Añade el fichero "wifi_mac" al directorio "/etc/network/if-pre-up.d/"
+
+* wifi_mac:
+  - Hace que la interfaz wifi (wlan0) use la misma MAC que tiene la interfaz ethernet (eth0)
+  - De esta forma, basta con tener dado de alta a los portátiles de profesores una sola vez en LDAP, para que puedan acceder a sus carpetas personales del servidor NFS.
+
+
+Antonio J. Abasolo Sierra
+IES Rodriguez Moñino
+Diciembre-2012
+
+

Property changes on: tareas_puppet/portatiles/comunes/wifi_mac/leeme.txt
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
