mirror of
https://github.com/StevenBlack/hosts.git
synced 2026-09-24 22:05:14 +01:00
Add localhost.localdomain and broadcasthost to the base hosts. This fixes Issue #87.
This commit is contained in:
@@ -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