Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions pkg/elemental/elemental.go
Original file line number Diff line number Diff line change
Expand Up @@ -549,6 +549,11 @@ func DeployRecoverySystem(cfg types.Config, img *types.Image, bootDir string) er
"linux": kernel,
"initrd": initrd,
} {
// if kernel/initrd is actually named "vmlinuz"/"initrd" we just skip the symlink part.
if kernel == name || initrd == name {
continue
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be a good idea to add a Debugf call just to simplify the debugging in case of issue:

Suggested change
continue
cfg.Logger.Debugf("No symlink needed, keeping exising %s file", name)
continue

}

source := filepath.Join(bootDir, name)
if exist, _ := utils.Exists(cfg.Fs, source, true); exist {
cfg.Logger.Debugf("Removing old symlink %s", source)
Expand Down