From b9d1d5d7d37ef97e6af3f5161ed35ef7b62fe166 Mon Sep 17 00:00:00 2001 From: Eslam-Nawara Date: Thu, 30 Nov 2023 13:50:12 +0200 Subject: [PATCH] rename firstBoot variable --- pkg/primitives/vm/utils.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/primitives/vm/utils.go b/pkg/primitives/vm/utils.go index 57f70b02f..44f4da698 100644 --- a/pkg/primitives/vm/utils.go +++ b/pkg/primitives/vm/utils.go @@ -101,7 +101,7 @@ func (p *Manager) prepContainer( // remounting in RW mode volName := fmt.Sprintf("rootfs:%s", wl.ID.String()) - isFirstBoot, err := storage.VolumeExists(ctx, volName) + volumeExists, err := storage.VolumeExists(ctx, volName) if err != nil { return errors.Wrap(err, "failed to check if vm rootfs exists") } @@ -129,7 +129,7 @@ func (p *Manager) prepContainer( } // clean up host keys - if isFirstBoot { + if !volumeExists { files, err := filepath.Glob(filepath.Join(mnt, "etc", "ssh", "ssh_host_*")) if err != nil { log.Fatal().Err(err)