diff options
author | Javier Jardón <javier.jardon@codethink.co.uk> | 2015-03-06 12:21:05 +0000 |
---|---|---|
committer | Javier Jardón <javier.jardon@codethink.co.uk> | 2015-03-16 17:59:53 +0000 |
commit | f1dce77123a814527f96d415b69ee10a06b8d36c (patch) | |
tree | ef56fdfe9a3efcda59d81ea5e4f0152955739e7e | |
parent | bbc0af46f600aff7c98f8790319fea53dafeca36 (diff) | |
download | definitions-f1dce77123a814527f96d415b69ee10a06b8d36c.tar.gz |
simple-network.configure: Move the generation of /etc/network/interfaces to a function
-rwxr-xr-x | simple-network.configure | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/simple-network.configure b/simple-network.configure index 13884e9d..c533ff22 100755 --- a/simple-network.configure +++ b/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) |