projects
/
tools
/
mic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
84d42de
)
skip set hosts by mic when /etc/hosts exists or add option to skip
97/220497/1
author
yan11.meng
<yan11.meng@samsung.com>
Thu, 19 Dec 2019 02:23:08 +0000
(10:23 +0800)
committer
yan11.meng
<yan11.meng@samsung.com>
Thu, 19 Dec 2019 02:23:08 +0000
(10:23 +0800)
Change-Id: Ic9c63103fdde12ead58fbef676952a575e97daed
mic/kickstart/__init__.py
patch
|
blob
|
history
diff --git
a/mic/kickstart/__init__.py
b/mic/kickstart/__init__.py
index
0c3959e
..
6fbf3ed
100755
(executable)
--- a/
mic/kickstart/__init__.py
+++ b/
mic/kickstart/__init__.py
@@
-674,7
+674,8
@@
class NetworkConfig(KickstartConfig):
#to avoid import error because of import each other
from mic.conf import configmgr
- if configmgr.create['skip_set_hosts'] == False:
+ path=self.path("/etc/hosts")
+ if configmgr.create['skip_set_hosts'] == False and os.path.exists(path) == False:
self.write_hosts(hostname)
self.write_resolv(nodns, nameservers)