Last change
on this file since 596 was
558,
checked in by sebas@…, 15 years ago
|
dnsmasq.hostsfile no es necesario aca
|
-
Property svn:executable set to
*
|
File size:
298 bytes
|
Rev | Line | |
---|
[555] | 1 | #!/bin/bash |
---|
| 2 | |
---|
| 3 | if [ "$1" = "del" ]; then |
---|
| 4 | exit |
---|
| 5 | fi |
---|
| 6 | |
---|
| 7 | isnew_mac=$(cat /etc/dnsmasq.hostsfile|grep -v "^#"|grep "$2") |
---|
| 8 | |
---|
| 9 | generatedhostname=$(echo "$2"| tr -d ':') |
---|
| 10 | |
---|
| 11 | if [ -z "$isnew_mac" ]; then |
---|
[558] | 12 | echo $2,PC$generatedhostname >> /etc/dnsmasq.hostsfile |
---|
[555] | 13 | pid=`pidof dnsmasq` |
---|
| 14 | kill -HUP $pid 2> /dev/null |
---|
| 15 | fi |
---|
Note: See
TracBrowser
for help on using the repository browser.