2N/A# Set a default boot entry for GRUB, for the next boot only. 2N/A# Copyright (C) 2004,2009 Free Software Foundation, Inc. 2N/A# GRUB is free software: you can redistribute it and/or modify 2N/A# it under the terms of the GNU General Public License as published by 2N/A# the Free Software Foundation, either version 3 of the License, or 2N/A# (at your option) any later version. 2N/A# GRUB is distributed in the hope that it will be useful, 2N/A# but WITHOUT ANY WARRANTY; without even the implied warranty of 2N/A# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 2N/A# GNU General Public License for more details. 2N/A# You should have received a copy of the GNU General Public License 2N/A# Initialize some variables. 2N/AUsage: $self [OPTION] entry 2N/ASet the default boot entry for GRUB, for the next boot only. 2N/A -h, --help print this message and exit 2N/A -v, --version print the version information and exit 2N/A --boot-directory=DIR expect GRUB images under the directory DIR/@grubdirname@ 2N/A instead of the $grubdir directory 2N/AENTRY is a number or a menu item title. 2N/AReport bugs to <bug-grub@gnu.org>. 2N/A echo "$0: option requires an argument -- '$opt'" 1>&2 2N/A# Check the arguments. 2N/A echo "$self (${PACKAGE_NAME}) ${PACKAGE_VERSION}" 2N/A# Accept for compatibility 2N/A echo "More than one entry?" 1>&
2 2N/A echo "entry not specified." 1>&
2 2N/A # Default bootdir if bootdir not initialized. 2N/A # Initialize bootdir if rootdir was initialized. 2N/A # We need some non-empty value for prev_saved_entry so that GRUB will 2N/A # recognise that grub-reboot has been used and restore the previous 2N/A # saved entry. "0" is the same as an empty value, i.e. the first menu