git://git.onelab.eu
/
bootmanager.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2ee1bfc
)
Daniel rightly pointed out that my change to use
author
Marc Fiuczynski
<mef@cs.princeton.edu>
Wed, 5 Nov 2008 13:59:35 +0000
(13:59 +0000)
committer
Marc Fiuczynski
<mef@cs.princeton.edu>
Wed, 5 Nov 2008 13:59:35 +0000
(13:59 +0000)
interface.get('hostname',hostname) instead of an if/then/else on
interface['hostname'] was not semantically equivalent. Reverted to
the original code for this case.
source/steps/WriteNetworkConfig.py
patch
|
blob
|
history
diff --git
a/source/steps/WriteNetworkConfig.py
b/source/steps/WriteNetworkConfig.py
index
46ce122
..
02d93ba
100644
(file)
--- a/
source/steps/WriteNetworkConfig.py
+++ b/
source/steps/WriteNetworkConfig.py
@@
-175,7
+175,10
@@
def Run( vars, log ):
elif interface['method'] == "dhcp":
inter['BOOTPROTO'] = "dhcp"
- inter['DHCP_HOSTNAME'] = interface.get('hostname',hostname)
+ if interface['hostname']:
+ inter['DHCP_HOSTNAME'] = interface['hostname']
+ else:
+ inter['DHCP_HOSTNAME'] = hostname
if not interface['is_primary']:
inter['DHCLIENTARGS'] = "-R subnet-mask"