From d306652c974842ee865c4bc73848e23eea14121e Mon Sep 17 00:00:00 2001 From: "Brent, Yang Bohan" Date: Mon, 25 Mar 2019 00:19:38 +0800 Subject: [PATCH] Update netboot.sh --- netboot.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/netboot.sh b/netboot.sh index 8af70b0..86520f3 100644 --- a/netboot.sh +++ b/netboot.sh @@ -150,11 +150,13 @@ else fi fi -if [ -z "$PASSWD" ] && [ "$MANUALLY" != true ]; then +if [ "$MANUALLY" != true ]; then +if [ -z "$PASSWD" ]; then PASSWD=$(mkpasswd -m sha-512) else PASSWD=$(mkpasswd -m sha-512 "$PASSWD") fi +fi if [ "$DRYRUN" != true ]; then