diff options
author | Vasudev Kamath <kamathvasudev@gmail.com> | 2015-11-09 13:28:42 +0530 |
---|---|---|
committer | Vasudev Kamath <kamathvasudev@gmail.com> | 2015-11-09 13:28:42 +0530 |
commit | 8f3cfde8bf26c0cd4635d6cba91024745a829b63 (patch) | |
tree | b9e3bae79a989f371245cbbc92e7deb9f3ac61ad | |
parent | 6dd741dcf759c3605df1b3941dd34cabb4ac9383 (diff) |
Fix the password display logic
-rwxr-xr-x | bootstrap_debian | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/bootstrap_debian b/bootstrap_debian index a8bd806..6324450 100755 --- a/bootstrap_debian +++ b/bootstrap_debian @@ -46,7 +46,6 @@ while true; do else # copied from lxc-debian template ROOT_PASSWD="$(dd if=/dev/urandom bs=6 count=1 2>/dev/null|base64)" - ECHO_PASSWD="yes" fi ;; --arch|--arch=?*) @@ -87,8 +86,7 @@ debootstrap --verbose --variant=minbase --arch=$ARCHITECTURE \ --include=$packages \ "$release" "$target" "$MIRROR" -echo "root:$ROOT_PASSWD" | chroot "$target" chpasswd - -if [ -n "$ECHO_PASSWD" ]; then +if [ -n "$ROOT_PASSWD" ]; then + echo "root:$ROOT_PASSWD" | chroot "$target" chpasswd echo "Root password is '$ROOT_PASSWRD', please change!" fi |