summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVasudev Kamath <kamathvasudev@gmail.com>2015-11-09 13:28:42 +0530
committerVasudev Kamath <kamathvasudev@gmail.com>2015-11-09 13:28:42 +0530
commit8f3cfde8bf26c0cd4635d6cba91024745a829b63 (patch)
treeb9e3bae79a989f371245cbbc92e7deb9f3ac61ad
parent6dd741dcf759c3605df1b3941dd34cabb4ac9383 (diff)
Fix the password display logic
-rwxr-xr-xbootstrap_debian6
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