Skip to content

Commit

Permalink
[installer]: remove old_config before backup (sonic-net#145)
Browse files Browse the repository at this point in the history
if /host/old_config exists, the copy command will copy sonic directory
into /host/old_config
  • Loading branch information
lguohan authored Nov 6, 2017
1 parent da3a1f8 commit 0a720ca
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions sonic_installer/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@ def install(url):
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")
click.echo('Done')

Expand Down

0 comments on commit 0a720ca

Please sign in to comment.