Prettify Docker '/etc/network/interfaces' file. Ref #2040

This commit is contained in:
grossmj 2022-04-20 19:29:56 +07:00
parent 653539d2b0
commit 460fe5ed95

View File

@ -294,7 +294,7 @@ class DockerVM(BaseNode):
if not os.path.exists(os.path.join(path, "interfaces")): if not os.path.exists(os.path.join(path, "interfaces")):
with open(os.path.join(path, "interfaces"), "w+") as f: with open(os.path.join(path, "interfaces"), "w+") as f:
f.write("""# f.write("""#
# This is a sample network config uncomment lines to configure the network # This is a sample network config, please uncomment lines to configure the network
# #
""") """)
@ -309,8 +309,9 @@ class DockerVM(BaseNode):
#\tup echo nameserver 192.168.{adapter}.1 > /etc/resolv.conf #\tup echo nameserver 192.168.{adapter}.1 > /etc/resolv.conf
# DHCP config for eth{adapter} # DHCP config for eth{adapter}
# auto eth{adapter} #auto eth{adapter}
# iface eth{adapter} inet dhcp""".format(adapter=adapter)) #iface eth{adapter} inet dhcp
""".format(adapter=adapter))
return path return path
async def create(self): async def create(self):