# Arnaldo Carvalho de Melo FWIW: GPLv2 # # Lists the grub2 kernel entries, marking the default kernel # sets the next kernel to boot, i.e. without setting it as default # allowing to reboot with the default kernel if the new kernel # fails. I.e. just a handy wrapper for grub2-set-default and for # listing the available kernels and which one is the default. if [ $# -eq 0 ] ; then default=`grub2-editenv list | cut -d= -f2` grep ^menu /etc/grub2-efi.cfg | cut -d\' -f2 | nl -v 0 | sed "s/\( *\) \(.*$default\)/\1-> \2/g" else grub2-set-default $1 fi