X-Git-Url: https://git.grml.org/?p=grml-debootstrap.git;a=blobdiff_plain;f=chroot-script;h=84086cc1b68649325dd55140ef28d8b0b9f9dd27;hp=fe0becb1817463fc71aa6ee2c75dd40b344b1be8;hb=ad7c3cfdaa7c6354c951a9dbbad6ada40a1dc082;hpb=61979477b00635f917604cccd664d176d081c506 diff --git a/chroot-script b/chroot-script index fe0becb..84086cc 100755 --- a/chroot-script +++ b/chroot-script @@ -182,7 +182,7 @@ packages() { if [ "$PACKAGES" = 'yes' ] ; then if ! [ -r /etc/debootstrap/packages ] ; then - echo "Error: /etc/debootstrap/packages not found, exiting." + echo "Error: /etc/debootstrap/packages (inside chroot) not found, exiting." >&2 exit 1 else $APTUPDATE @@ -241,6 +241,11 @@ reconfigure() { # set password of user root {{{ passwords() { + if [ -n "$NOPASSWORD" ] ; then + echo "Skip setting root password as requested." + return 0 + fi + echo "Activating shadow passwords." shadowconfig on @@ -249,7 +254,6 @@ passwords() CHPASSWD_OPTION='-m' fi - if [ -n "$ROOTPASSWORD" ] ; then echo root:"$ROOTPASSWORD" | chpasswd $CHPASSWD_OPTION export ROOTPASSWORD=''