-
Notifications
You must be signed in to change notification settings - Fork 0
Conversation
This has the problem, that it always switches to the default kernel, because the kernel selected by the last boot or "mxgrub KERNEL" is inside the submenu if it is not the default kernel. https://www.gnu.org/software/grub/manual/grub.html#default
|
What about
? |
Let's assume this is installed on the distmaster and mxgrub --update is run there (e.g. after a kernel install). Now a new grub.cfg is written and pushed around. However, the individual system will still have their old grubenv. This contains (e.g.) |
That's right.
|
mxgrub/mxgrub
Outdated
} else { | ||
/^chosen=(.+)/ and return $1; | ||
} | ||
|
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.
I think this could be reduced to
while (<$p>) {
/^chosen=(?:all-other-kernel>)?(.+)/ and return $1
}
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.
If we need to do ./mxgrub $(grub-editenv list |cut -d"=" -f2)
one every system after the dist of the updated grub.cfg anyway, we could even ignore the old chosen=(.+)
variant and match the newchosen=all-other-kernel>(.+)
variant only.
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.
But when you use
mxgrub default
and after that (without reboot)
mxgrub --list
you don't see the chosen one
But the shorter one is cool
mxgrub/mxgrub
Outdated
if [ \$chosen ]; then | ||
set default=\$chosen | ||
unset chosen # must be clear to get a clean value from menuentry | ||
fi |
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.
white space change intended?
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.
Yeah right
That's not what I want.
I changed it back
0d4e217
to
5b194e1
Compare
already disted it and fixup |
No description provided.