mirror of
https://github.com/bohanyang/debi.git
synced 2026-09-27 06:26:15 +00:00
Update
This commit is contained in:
Regular → Executable
+8
-5
@@ -302,16 +302,17 @@ if [ "$skip_account_setup" != true ]; then
|
|||||||
|
|
||||||
if command_exists mkpasswd; then
|
if command_exists mkpasswd; then
|
||||||
if [ -z "$password" ]; then
|
if [ -z "$password" ]; then
|
||||||
password="$(mkpasswd -m sha512crypt)"
|
password="$(mkpasswd -m sha-512)"
|
||||||
else
|
else
|
||||||
password="$(mkpasswd -m sha512crypt "$password")"
|
password="$(mkpasswd -m sha-512 "$password")"
|
||||||
fi
|
fi
|
||||||
elif command_exists busybox && busybox mkpasswd --help >/dev/null 2>&1; then
|
elif command_exists busybox && busybox mkpasswd --help >/dev/null 2>&1; then
|
||||||
if [ -z "$password" ]; then
|
if [ -z "$password" ]; then
|
||||||
password="$(busybox mkpasswd -m sha512)"
|
printf '\n%s' 'Password: ' 1>&2
|
||||||
else
|
read -rs password
|
||||||
password="$(busybox mkpasswd -m sha512 "$password")"
|
echo 1>&2
|
||||||
fi
|
fi
|
||||||
|
password="$(busybox mkpasswd -m sha512 "$password")"
|
||||||
elif command_exists python3; then
|
elif command_exists python3; then
|
||||||
if [ -z "$password" ]; then
|
if [ -z "$password" ]; then
|
||||||
password="$(python3 -c 'import crypt, getpass; print(crypt.crypt(getpass.getpass(), crypt.mksalt(crypt.METHOD_SHA512)))')"
|
password="$(python3 -c 'import crypt, getpass; print(crypt.crypt(getpass.getpass(), crypt.mksalt(crypt.METHOD_SHA512)))')"
|
||||||
@@ -321,7 +322,9 @@ if [ "$skip_account_setup" != true ]; then
|
|||||||
else
|
else
|
||||||
cleartext_password=true
|
cleartext_password=true
|
||||||
if [ -z "$password" ]; then
|
if [ -z "$password" ]; then
|
||||||
|
printf '\n%s' 'Password: ' 1>&2
|
||||||
read -rs password
|
read -rs password
|
||||||
|
echo 1>&2
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user