Skip to content

Commit

Permalink
[sonic_install] sync filesystem after file copy is done (sonic-net#189)
Browse files Browse the repository at this point in the history
* [sonic_installer] sync filesystem after file copy is done

* [sonics-installer] sleep 3 seconds after executing sync
  • Loading branch information
yxieca authored Jan 18, 2018
1 parent 17e0bf9 commit c6bcfa6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion sonic_installer/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,9 +189,12 @@ def install(url):
os.chmod(image_path, stat.S_IXUSR)
run_command(image_path)
run_command('grub-set-default --boot-directory=' + HOST_PATH + ' 0')
run_command("sync")
run_command("rm -rf /host/old_config")
run_command("cp -r /etc/sonic /host/old_config")

# sync filesystem, keep at last step.
run_command("sync")
run_command("sleep 3") # wait 3 seconds after sync
click.echo('Done')


Expand Down

0 comments on commit c6bcfa6

Please sign in to comment.