X-Git-Url: https://git.grml.org/?p=grml-debootstrap.git;a=blobdiff_plain;f=chroot-script;h=f9e3b0e8acd8d5f697fcd58f29c93de8b0c417f0;hp=8fdf89438ba4deedf3e2fa99d4e592d26d113de3;hb=9661ed19d8209b2505f4224f6613c81cfbc18629;hpb=8c6f711136560ee132b84aa730f2ec1dac79a3f7 diff --git a/chroot-script b/chroot-script index 8fdf894..f9e3b0e 100755 --- a/chroot-script +++ b/chroot-script @@ -4,7 +4,6 @@ # Authors: grml-team (grml.org), (c) Michael Prokop # Bug-Reports: see http://grml.org/bugs/ # License: This file is licensed under the GPL v2. -# Latest change: Tue Aug 26 20:59:31 CEST 2008 [mika] ################################################################################ set -e # exit on any error @@ -138,7 +137,7 @@ packages() { exit 1 else $APTUPDATE - DEBIAN_FRONTEND=$DEBIAN_FRONTEND $APTINSTALL $(cat /etc/debootstrap/packages) $GRMLPACKAGES + DEBIAN_FRONTEND=$DEBIAN_FRONTEND $APTINSTALL $(grep -v '^#' /etc/debootstrap/packages) $GRMLPACKAGES fi fi } @@ -209,12 +208,23 @@ passwords() { echo root:"$ROOTPASSWD" | chpasswd -m export ROOTPASSWD='' else + a='1' + b='2' echo "Setting password for user root:" - echo -n "Enter new UNIX password for user root: " - read -s a - echo root:"$a" | chpasswd -m - unset a - echo + while [ "$a" != "$b" ] ; do + echo -n "Enter new UNIX password for user root: " + read -s a + echo + echo -n "Retype new UNIX password for user root: " + read -s b + echo + echo root:"$a" | chpasswd -m + if [ "$a" != "$b" ] ; then + echo "Sorry, passwords do not match. Retry." + fi + unset a + unset b + done fi } # }}}