From: Michael Prokop Date: Thu, 28 Aug 2008 14:58:55 +0000 (+0200) Subject: Improve passwords() X-Git-Tag: 0.18~10 X-Git-Url: https://git.grml.org/?p=grml-debootstrap.git;a=commitdiff_plain;h=27c6e3747c7a02dd9dd6ad71fe2b3d00f5a0b739;hp=f5eec04fc41bd120e40c5ec4e3246dca6c488b24 Improve passwords() --- diff --git a/chroot-script b/chroot-script index f9e3b0e..64563cb 100755 --- a/chroot-script +++ b/chroot-script @@ -200,7 +200,8 @@ reconfigure() { # }}} # set password of user root {{{ -passwords() { +passwords() +{ echo "Activating shadow passwords." shadowconfig on @@ -218,12 +219,15 @@ passwords() { 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." + a='1' + b='2' + else + echo root:"$a" | chpasswd -m + unset a + unset b fi - unset a - unset b done fi } diff --git a/grml-debootstrap b/grml-debootstrap index 0182ee9..e6bfe74 100755 --- a/grml-debootstrap +++ b/grml-debootstrap @@ -792,10 +792,12 @@ done # }}} # finalize {{{ +einfo "Removing ${CHROOT_VARIABLES}" ; rm "$CHROOT_VARIABLES" ; eend $? +einfo "Removing ${STAGES}" ; rmdir "$STAGES" ; eend $? + # Remove temporary mountpoint again if echo "$MNTPOINT" | grep -q '/mnt/debootstrap\.' ; then einfo "Removing directory ${MNTPOINT}" ; rmdir "$MNTPOINT" ; eend $? - einfo "Removing ${CHROOT_VARIABLES}" ; rm "$CHROOT_VARIABLES" ; eend $? fi # }}}