source: trunk/puppet/modules/puppet-dnsmasq/files/dnsmasq-genhostname.sh @ 766

Last change on this file since 766 was 558, checked in by sebas@…, 15 years ago

dnsmasq.hostsfile no es necesario aca

  • Property svn:executable set to *
File size: 298 bytes
Line 
1#!/bin/bash
2
3if [ "$1" = "del" ]; then
4  exit
5fi
6
7isnew_mac=$(cat /etc/dnsmasq.hostsfile|grep -v "^#"|grep "$2")
8
9generatedhostname=$(echo "$2"| tr -d ':')
10
11if [ -z "$isnew_mac" ]; then
12  echo $2,PC$generatedhostname >> /etc/dnsmasq.hostsfile
13  pid=`pidof dnsmasq`
14  kill -HUP $pid 2> /dev/null
15fi
Note: See TracBrowser for help on using the repository browser.