Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix passive snapshots listing in grub.cfg #2022

Merged
merged 1 commit into from
Mar 21, 2024

Conversation

davidcassany
Copy link
Contributor

No description provided.

Signed-off-by: David Cassany <dcassany@suse.com>
@davidcassany davidcassany requested a review from a team as a code owner March 21, 2024 12:05
@davidcassany davidcassany added the kind/bug Something isn't working label Mar 21, 2024
@davidcassany davidcassany added this to the Micro6 milestone Mar 21, 2024
set mode=passive
search --no-floppy --label --set=root ${state_label}
set_volume ${passive_snap}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This variable inside the menu is not expanded when looping, in fact it is expanded when choosing the actual menu item and it takes the value of the last assignement in the loop. Should have been passed as an argument to the menuentry call.

@@ -90,10 +90,10 @@ menuentry "${display_name}" --id active {
}

for passive_snap in ${passive_snaps}; do
menuentry "${display_name} (snapshot ${passive_snap})" --id ${passive_snap} {
menuentry "${display_name} (snapshot ${passive_snap})" --id passive${passive_snap} ${passive_snap} {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ensuring the ID is not set to a number, as then it turns to be confusing with the fallback values, which is just a counter of the menu items, starting from 0 at top. So if a menu is chosen by ID it will not definitely be a number. If a number is used, then menu counter applies.

Copy link
Contributor

@frelon frelon left a comment

Choose a reason for hiding this comment

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

Good catch!

@davidcassany davidcassany merged commit 4fb44d2 into rancher:main Mar 21, 2024
17 checks passed
@davidcassany davidcassany deleted the fix_grub branch March 21, 2024 12:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

3 participants