Opened 13 years ago
Closed 13 years ago
#61 closed enhancement (fixed)
Crear Hostname dinamico al bootear
Reported by: | sebas | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | |
Component: | servicio : dhcp / netboot | Version: | |
Keywords: | Cc: |
Description
Para las maquinas que se enchufan por primera vez al red necesitamos crear un hostname de manera dinamica. Es necesario para la instalacion.
Change History (6)
comment:1 Changed 13 years ago by
comment:2 Changed 13 years ago by
un ejemplo de uso de script http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/2006q2/000831.html
comment:4 Changed 13 years ago by
http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/2010q1/003811.html posteo en la lista de dnsmasq a ver que dicen ellos!
comment:5 Changed 13 years ago by
primera version del script. :) hay que probarlo bien.
#!/bin/bash -x if [ "$1" = "del" ]; then exit fi isnew_mac=$(cat /etc/ethers|grep -v "^#"|grep "$2") generatedhostname=$(echo "$2"| tr -d ':') if [ -z "$isnew_mac" ]; then echo $2 PC$generatedhostname >> /etc/ethers /etc/init.d/dnsmasq restart # kill -HUP 5236 # kill -USR1 5236 fi
Note: See
TracTickets for help on using
tickets.
http://linuca.org/pipermail/linuxcantabria/2006-June/007314.html
un ejemplo... sin probar.