mirror of
https://github.com/xcat2/confluent.git
synced 2024-11-25 19:10:10 +00:00
Prefer shortname for collective
When a colleective begins, default to using the shortname, even if gethostname returns a long one.
This commit is contained in:
parent
8da513b152
commit
22024b23b8
@ -237,7 +237,7 @@ def get_myname():
|
||||
mycachedname[1] = time.time()
|
||||
return mycachedname[0]
|
||||
except IOError:
|
||||
myname = socket.gethostname()
|
||||
myname = socket.gethostname().split('.')[0]
|
||||
with open('/etc/confluent/cfg/myname', 'w') as f:
|
||||
f.write(myname)
|
||||
mycachedname[0] = myname
|
||||
|
Loading…
Reference in New Issue
Block a user