mirror of
https://github.com/kevingruesser/bootstrap-vz.git
synced 2025-08-24 15:36:27 +00:00
Simpler json network config by auto inserting \n
This commit is contained in:
parent
319c6e655a
commit
0cfda1bdb5
2 changed files with 9 additions and 9 deletions
|
@ -1,13 +1,13 @@
|
||||||
{
|
{
|
||||||
"squeeze": [
|
"squeeze": [
|
||||||
"auto lo\n",
|
"auto lo",
|
||||||
"iface lo inet loopback\n",
|
"iface lo inet loopback",
|
||||||
"auto eth0\n",
|
"auto eth0",
|
||||||
"iface eth0 inet dhcp\n" ],
|
"iface eth0 inet dhcp" ],
|
||||||
"wheezy": [
|
"wheezy": [
|
||||||
"auto eth0\n",
|
"auto eth0",
|
||||||
"iface eth0 inet dhcp\n" ],
|
"iface eth0 inet dhcp" ],
|
||||||
"unstable": [
|
"unstable": [
|
||||||
"auto eth0\n",
|
"auto eth0",
|
||||||
"iface eth0 inet dhcp\n" ]
|
"iface eth0 inet dhcp" ]
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,4 +35,4 @@ class ConfigureNetworkIF(Task):
|
||||||
import json
|
import json
|
||||||
if_config = json.loads(stream.read())
|
if_config = json.loads(stream.read())
|
||||||
with open(interfaces_path, 'a') as interfaces:
|
with open(interfaces_path, 'a') as interfaces:
|
||||||
interfaces.write(''.join(if_config.get(info.manifest.system['release'])))
|
interfaces.write('\n'.join(if_config.get(info.manifest.system['release'])))
|
||||||
|
|
Loading…
Add table
Reference in a new issue