From 62c947594635cc0edffa2ac4826641d8df33ae28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javier=20Jard=C3=B3n?= Date: Fri, 6 Mar 2015 12:21:05 +0000 Subject: simple-network.configure: Move the generation of /etc/network/interfaces to a function --- morphlib/exts/simple-network.configure | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'morphlib/exts/simple-network.configure') diff --git a/morphlib/exts/simple-network.configure b/morphlib/exts/simple-network.configure index 13884e9d..c533ff22 100755 --- a/morphlib/exts/simple-network.configure +++ b/morphlib/exts/simple-network.configure @@ -48,8 +48,13 @@ class SimpleNetworkConfigurationExtension(cliapp.Application): self.status(msg="Processing NETWORK_CONFIG=%(nc)s", nc=network_config) stanzas = self.parse_network_stanzas(network_config) - iface_file = self.generate_iface_file(stanzas) + self.generate_interfaces_file(args, stanzas) + + def generate_interfaces_file(self, args, stanzas): + """Generate /etc/network/interfaces file""" + + iface_file = self.generate_iface_file(stanzas) with open(os.path.join(args[0], "etc/network/interfaces"), "w") as f: f.write(iface_file) -- cgit v1.2.1