Improve passwords()
authorMichael Prokop <devnull@localhost>
Thu, 28 Aug 2008 14:58:55 +0000 (16:58 +0200)
committerMichael Prokop <devnull@localhost>
Thu, 28 Aug 2008 14:58:55 +0000 (16:58 +0200)
chroot-script
grml-debootstrap

index f9e3b0e..64563cb 100755 (executable)
@@ -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
 }
index 0182ee9..e6bfe74 100755 (executable)
@@ -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
 # }}}