# autoboot, nothing left to do but boot
#
# Copyright 2013 Red Hat, Inc.  All rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.

cat << EOF

if test -n \$u_dtb; then
  if run set_u_k; then
    echo Auto-booting \$u_kernel in 3 seconds.  Type ^C to abort then \\"run menu\\" for help.
    for i in 3 2 1; do echo \\\\\\\\c \$i; sleep 1; done; echo ...
    if test $? = 0; then
      run bootcmd
    fi
    run help
  else
    echo "No value for u_kernel.  Getting help."
    echo
    run help
  fi
else
  echo "Failed to auto-boot"
  run set_u_k_nodtb
fi

EOF
