Ignore:
Timestamp:
07/08/13 12:25:26 (13 months ago)
Author:
Kris Moore <kris@…>
Branches:
master, 9.2-release, releng/10.0, releng/10.0.1, releng/10.0.2
Children:
336650c
Parents:
e2fa25c
Message:

Update how grub displays menus

When we only have a single boot-environment, we won't display
the menu, unless the user holds down the SHIFT key. The system
will auto-boot after 2 seconds.

If multiple BE's are found, it will display the menu with a 5 second
timeout, allowing the user to halt and choose another BE.

Suggested by: Jordan Hubbard

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src-sh/pc-extractoverlay/ports-overlay/usr/local/etc/grub.d/00_header

    re2fa25c r47f2308  
    4141if [ "x${GRUB_GFXMODE}" = "x" ] ; then GRUB_GFXMODE=auto ; fi 
    4242 
     43# Check if we have more than one BE, and need to show the menu by default 
     44beNum=`beadm list 2>/dev/null | grep -v 'Mountpoint' | wc -l | awk '{print $1}'` 
     45if [ $beNum -gt 1 ] ; then GRUB_HIDDEN_TIMEOUT=""; fi 
     46 
    4347if [ "x${GRUB_DEFAULT_BUTTON}" = "x" ] ; then GRUB_DEFAULT_BUTTON="$GRUB_DEFAULT" ; fi 
    4448if [ "x${GRUB_DEFAULT_BUTTON}" = "xsaved" ] ; then GRUB_DEFAULT_BUTTON='${saved_entry}' ; fi 
     
    281285        cat << EOF 
    282286if sleep$verbose --interruptible ${1} ; then 
    283   set timeout=${2} 
     287  if keystatus --shift; then 
     288    set timeout=-1 
     289  else 
     290    set timeout=${2} 
     291  fi 
    284292fi 
    285293EOF 
Note: See TracChangeset for help on using the changeset viewer.