1N/A# Encrypt a password in MD5 format 1N/A# Copyright (C) 2000,2002 Free Software Foundation, Inc. 1N/A# This file is free software; you can redistribute it and/or modify it 1N/A# under the terms of the GNU General Public License as published by 1N/A# the Free Software Foundation; either version 2 of the License, or 1N/A# (at your option) any later version. 1N/A# This program is distributed in the hope that it will be useful, but 1N/A# WITHOUT ANY WARRANTY; without even the implied warranty of 1N/A# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1N/A# General Public License for more details. 1N/A# You should have received a copy of the GNU General Public License 1N/A# along with this program; if not, write to the Free Software 1N/A# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 1N/A# Replaced by the configure script. 1N/A# Initialize some variables. 1N/A# Check the arguments. 1N/AUsage: $progname [OPTION] 1N/AEncrypt a password in MD5 format. 1N/A -h, --help print this message and exit 1N/A -v, --version print the version information and exit 1N/A --grub-shell=FILE use FILE as the grub shell 1N/AReport bugs to <bug-grub@gnu.org>. 1N/A# Suppress echo backs. I don't know if this is really portable. -okuji 1N/A# Prompt to enter a password. 1N/Aecho -n
"Retype password: " 1N/A echo "Empty password is not permitted." 1N/A echo "Sorry, passwords do not match." 1N/A# Run the grub shell. 1N/A | grep "^Encrypted: " | sed 's/^Encrypted: //'