diff --git a/pkg/bird/bird.go b/pkg/bird/bird.go index f8a9d358..9cfc6ec3 100644 --- a/pkg/bird/bird.go +++ b/pkg/bird/bird.go @@ -231,6 +231,16 @@ func MoveCacheAndReconfigure(birdDirectory string, cacheDirectory string, birdSo } } + // Move config file + log.Debug("Moving Pathvector config file") + configFilename := "pathvector.yml" + if err := util.MoveFile( + path.Join(cacheDirectory, configFilename), + path.Join(birdDirectory, configFilename), + ); err != nil { + log.Fatalf("Moving pathvector config file: %v", err) + } + if !noConfigure { log.Info("Reconfiguring BIRD") resp, _, err := RunCommand("configure", birdSocket) diff --git a/pkg/process/process.go b/pkg/process/process.go index a5beec16..ab34d197 100644 --- a/pkg/process/process.go +++ b/pkg/process/process.go @@ -822,6 +822,12 @@ func Run(configFilename, lockFile, version string, noConfigure, dryRun, withdraw // Run BIRD config validation bird.Validate(c.BIRDBinary, c.CacheDirectory) + // Copy config file + log.Debug("Copying Pathvector config file to cache directory") + if err := util.CopyFile(configFilename, path.Join(c.CacheDirectory, "pathvector.yml")); err != nil { + log.Fatalf("Copying pathvector config file to cache directory: %v", err) + } + if !dryRun { // Write protocol name map names := templating.ProtocolNames()