Просмотр исходного кода

Copy resolv.conf contents for links during OSMorphing.

Depending on the OSMorphing worker VM OS, resolv.conf might be a symlink
with a relative path.
This commit makes Coriolis always copy the contents of resolv.conf when
patching it during the OSMorphing process.
Nashwan Azhari 6 лет назад
Родитель
Сommit
85b92149ec
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      coriolis/osmorphing/base.py

+ 1 - 1
coriolis/osmorphing/base.py

@@ -177,7 +177,7 @@ class BaseLinuxOSMorphingTools(BaseOSMorphingTools):
         if self._test_path(resolv_conf_path):
         if self._test_path(resolv_conf_path):
             self._exec_cmd(
             self._exec_cmd(
                 "sudo mv -f %s %s" % (resolv_conf_path, resolv_conf_path_old))
                 "sudo mv -f %s %s" % (resolv_conf_path, resolv_conf_path_old))
-        self._exec_cmd('sudo cp --remove-destination /etc/resolv.conf %s' %
+        self._exec_cmd('sudo cp -L --remove-destination /etc/resolv.conf %s' %
                        resolv_conf_path)
                        resolv_conf_path)
 
 
     def _restore_resolv_conf(self):
     def _restore_resolv_conf(self):