Change-Id: Iff87c0f9a6d84713a5957fa6fde56894df868176
Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/3973
Reviewed-by: Bo Gan <ganb@vmware.com>
Tested-by: gerrit-photon <photon-checkins@vmware.com>
| ... | ... |
@@ -5,12 +5,7 @@ |
| 5 | 5 |
import subprocess |
| 6 | 6 |
import curses |
| 7 | 7 |
import os |
| 8 |
-import crypt |
|
| 9 |
-import re |
|
| 10 |
-import random |
|
| 11 |
-import string |
|
| 12 | 8 |
import shutil |
| 13 |
-import fnmatch |
|
| 14 | 9 |
import signal |
| 15 | 10 |
import sys |
| 16 | 11 |
import glob |
| ... | ... |
@@ -173,7 +168,8 @@ class Installer(object): |
| 173 | 173 |
if self.iso_installer: |
| 174 | 174 |
self.progress_bar.show_loading('Finalizing installation')
|
| 175 | 175 |
|
| 176 |
- shutil.copy("/etc/resolv.conf", self.photon_root + '/etc/.')
|
|
| 176 |
+ if os.path.exists("/etc/resolv.conf"):
|
|
| 177 |
+ shutil.copy("/etc/resolv.conf", self.photon_root + '/etc/.')
|
|
| 177 | 178 |
self.finalize_system() |
| 178 | 179 |
|
| 179 | 180 |
if not self.install_config['iso_system']: |