mirror of
https://github.com/StevenBlack/hosts.git
synced 2026-11-14 22:58:20 +00:00
Add localhost.localdomain and broadcasthost to the base hosts. This fixes Issue #87.
This commit is contained in:
1 parent
a1a43cfa5d
commit
ab129243b8
1 file changed
+4
@@ -248,6 +248,8 @@ def removeDupsAndExcl(mergeFile):
|
||||
|
||||
hostnames = set()
|
||||
hostnames.add("localhost")
|
||||
hostnames.add("localhost.localdomain")
|
||||
hostnames.add("broadcasthost")
|
||||
for line in mergeFile.readlines():
|
||||
write = 'true'
|
||||
# Explicit encoding
|
||||
@@ -320,6 +322,8 @@ def writeOpeningHeader(finalFile):
|
||||
writeData(finalFile, '# ===============================================================\n')
|
||||
writeData(finalFile, '\n')
|
||||
writeData(finalFile, '127.0.0.1 localhost\n')
|
||||
writeData(finalFile, '127.0.0.1 localhost.localdomain\n')
|
||||
writeData(finalFile, '255.255.255.255 broadcasthost\n')
|
||||
writeData(finalFile, '::1 localhost\n')
|
||||
writeData(finalFile, '\n')
|
||||
|
||||
|
||||
Reference in new issue
Block a user