Browse Source

Merge "Sets correct permission for /etc/hosts"

tags/9.0.0.0rc1
Zuul 9 months ago
parent
commit
8659169c84
1 changed files with 3 additions and 2 deletions
  1. 3
    2
      sahara/service/engine.py

+ 3
- 2
sahara/service/engine.py View File

@@ -171,8 +171,9 @@ class Engine(object):
171 171
             r.write_file_to('etc-hosts', hosts_file)
172 172
             r.write_file_to('etc-hostname', hostname)
173 173
             r.execute_command('sudo hostname %s' % hostname)
174
-            r.execute_command('sudo mv etc-hosts /etc/hosts')
175
-            r.execute_command('sudo mv etc-hostname /etc/hostname')
174
+            r.execute_command('sudo cp etc-hosts /etc/hosts')
175
+            r.execute_command('sudo cp etc-hostname /etc/hostname')
176
+            r.execute_command('sudo rm etc-hosts  etc-hostname')
176 177
             r.execute_command('sudo usermod -s /bin/bash $USER')
177 178
 
178 179
     def _configure_instance_resolve_conf(self, instance):

Loading…
Cancel
Save