Skip to content

Commit

Permalink
rename firstBoot variable
Browse files Browse the repository at this point in the history
  • Loading branch information
Eslam-Nawara committed Nov 30, 2023
1 parent b6b358b commit b9d1d5d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/primitives/vm/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit b9d1d5d

Please sign in to comment.