-
Notifications
You must be signed in to change notification settings - Fork 53
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
Conversation
Signed-off-by: David Cassany <dcassany@suse.com>
set mode=passive | ||
search --no-floppy --label --set=root ${state_label} | ||
set_volume ${passive_snap} |
There was a problem hiding this comment.
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} { |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch!
No description provided.