[installer]: Add support for grub-set-default. (#532)
Its needed for Azure/sonic-utilities#40 for user to set default image for boot. grub-set-default utility writes to value of saved_entry variable to grubenv. https://www.gnu.org/software/grub/manual/legacy/Invoking-grub_002dset_002ddefault.html This patch provides support for grub-set-default to allow user choose a default image to boot from. Signed-off-by: marian-pritsak <marianp@mellanox.com>
This commit is contained in:
parent
f28790ce9a
commit
035b08b9c4
@ -489,11 +489,14 @@ set timeout=5
|
||||
|
||||
EOF
|
||||
|
||||
# Add the logic to support grub-reboot
|
||||
# Add the logic to support grub-reboot and grub-set-default
|
||||
cat <<EOF >> $grub_cfg
|
||||
if [ -s \$prefix/grubenv ]; then
|
||||
load_env
|
||||
fi
|
||||
if [ "\${saved_entry}" ] ; then
|
||||
set default="\${saved_entry}"
|
||||
fi
|
||||
if [ "\${next_entry}" ] ; then
|
||||
set default="\${next_entry}"
|
||||
set next_entry=
|
||||
|
Loading…
Reference in New Issue
Block a user