diff --git a/hbd b/hbd index 8e5910d..0e0cce2 100755 --- a/hbd +++ b/hbd @@ -1,5 +1,5 @@ #!/usr/bin/env python -# $Id: hbd,v 1.10 2006/04/28 12:23:59 andreas Exp $ +# $Id: hbd,v 1.11 2006/04/28 12:53:08 andreas Exp $ # Wait for heartbeat messages and act on them (or their absence) # import time, os, string, sys, socket, atexit, select, SocketServer, getopt @@ -252,6 +252,13 @@ def fromaddr(name, addr, boot, interval): if not htab.has_key(addr): addhost(name, addr) host=hosts[htab[addr]] + if host.name != name: + log("%s changed name to %s" % (host.name, name)) + del hosts[host.name] + host.name=name + hosts[name]=host + htab[addr]=name + host.lastbeat=now if host.getstate() != Host.up and interval > 0: lasts=host.state