From e6cf0015aeb21c56d8257ef5828d365e14dc5937 Mon Sep 17 00:00:00 2001 From: agahhulusi Date: Wed, 30 Dec 2020 10:36:19 +0300 Subject: [PATCH] static IP bug fixed --- src/plugins/network-manager/add_network.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/network-manager/add_network.py b/src/plugins/network-manager/add_network.py index 783d7c5..2a15576 100644 --- a/src/plugins/network-manager/add_network.py +++ b/src/plugins/network-manager/add_network.py @@ -32,12 +32,12 @@ class AddNetwork(AbstractPlugin): try: if self.type == 'STATIC': if self.is_active is True: - self.content = 'iface {0} inet static\n address {1}\n netmask {2}\n gateway {3}\n'.format(self.name, + self.content = 'auto {0}\n iface {0} inet static\n address {1}\n netmask {2}\n gateway {3}\n'.format(self.name, self.ip, self.netmask, self.gateway) else: - self.content = 'iface {0} inet static\n#address {1}\n#netmask {2}\n#gateway {3}\n'.format(self.name, + self.content = 'auto {0}\n iface {0} inet static\n#address {1}\n#netmask {2}\n#gateway {3}\n'.format(self.name, self.ip, self.netmask, self.gateway)