if [ "x\${timeout}" != "x-1" ]; then
  if keystatus; then
    if keystatus --shift; then
      set timeout=-1
    else
      set timeout=0
    fi
  else
    if sleep --interruptible 2; then
      set timeout=0
    fi
  fi
fi

if [ -s $prefix/grubenv ]; then
  set have_grubenv=true
  load_env
fi
if [ "${next_entry}" ] ; then
   set default="${next_entry}"
   set next_entry=
   save_env next_entry
   set boot_once=true
else
   set default="${saved_entry}"
fi
if [ "${prev_saved_entry}" ]; then
  set saved_entry="${prev_saved_entry}"
  save_env saved_entry
  set prev_saved_entry=
  save_env prev_saved_entry
  set boot_once=true
fi

function savedefault {
  if [ -z "${boot_once}" ]; then
    saved_entry="${chosen}"
    save_env saved_entry
  fi
}

menuentry "OpenADK1" {
  set root=(hd0,2)
  linux (hd0,2)/kernel root=/dev/@@ROOTDEV@@2 rootfstype=ext4 rootwait panic=5
}
menuentry "OpenADK2" {
  set root=(hd0,3)
  linux (hd0,3)/kernel root=/dev/@@ROOTDEV@@3 rootfstype=ext4 rootwait panic=5
}

