diff options
Diffstat (limited to 'src/init')
| -rwxr-xr-x | src/init/vyos-router | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/init/vyos-router b/src/init/vyos-router index 794715368..550c916a1 100755 --- a/src/init/vyos-router +++ b/src/init/vyos-router @@ -312,6 +312,23 @@ bind_mount_boot () fi } +# this is called before migration and bind_mount_slash_config to check for +# upgrade data installed by legacy image update tools +copy_legacy_config_path () +{ + if [ -d /config ] ; then + if [ -f /config/.upgraded ] ; then + rm -f /config/.upgraded + cp -a /config /opt/vyatta/etc + chgrp -R vyattacfg /opt/vyatta/etc/config + chmod -R 775 /opt/vyatta/etc/config + chmod 660 /opt/vyatta/etc/config/config.boot + touch /opt/vyatta/etc/config/.vyatta_config + rm -rf /config + fi + fi +} + bind_mount_slash_config () { if [ -d /opt/vyatta/etc/config ] @@ -578,6 +595,8 @@ start () # This is a safety net! systemctl start frr.service + disabled copy_legacy_config_path || copy_legacy_config_path + disabled bootfile || init_bootfile cleanup_post_commit_hooks |
