git://git.onelab.eu
/
pyplnet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
50c4f24
)
Only set DNS1 and DNS2 for the primary network, if they exist.
author
Daniel Hokka Zakrisson
<dhokka@cs.princeton.edu>
Sat, 30 Jan 2010 03:43:20 +0000
(
03:43
+0000)
committer
Daniel Hokka Zakrisson
<dhokka@cs.princeton.edu>
Sat, 30 Jan 2010 03:43:20 +0000
(
03:43
+0000)
plnet.py
patch
|
blob
|
history
diff --git
a/plnet.py
b/plnet.py
index
a94236e
..
abfeb37
100755
(executable)
--- a/
plnet.py
+++ b/
plnet.py
@@
-85,10
+85,12
@@
def InitInterfaces(logger, plc, data, root="", files_only=False, program="NodeMa
inter['BOOTPROTO'] = "static"
inter['IPADDR'] = network['ip']
inter['NETMASK'] = network['netmask']
- inter['DNS1'] = network['dns1']
- inter['DNS2'] = network['dns2']
if network['is_primary']:
gateway = network['gateway']
+ if network['dns1']:
+ inter['DNS1'] = network['dns1']
+ if network['dns2']:
+ inter['DNS2'] = network['dns2']
elif network['method'] == "dhcp":
inter['BOOTPROTO'] = "dhcp"