mirror of
https://github.com/bohanyang/debi.git
synced 2026-09-26 22:16:11 +00:00
Update
This commit is contained in:
@@ -353,14 +353,13 @@ d-i mirror/udeb/suite string $suite
|
|||||||
EOF
|
EOF
|
||||||
|
|
||||||
if [ "$account_setup" = true ]; then
|
if [ "$account_setup" = true ]; then
|
||||||
if command_exists mkpasswd; then
|
password_hash=$(mkpasswd -m sha-256 "$password" 2> /dev/null) ||
|
||||||
password_hash=$(mkpasswd -m sha-256 "$password")
|
password_hash=$(openssl passwd -5 "$password" 2> /dev/null) ||
|
||||||
elif command_exists busybox && busybox mkpasswd --help > /dev/null 2>&1; then
|
password_hash=$(busybox mkpasswd -m sha256 "$password" 2> /dev/null) || {
|
||||||
password_hash=$(busybox mkpasswd -m sha256 "$password")
|
for python in python3 python python2; do
|
||||||
else
|
password_hash=$("$python" -c 'import crypt, sys; print(crypt.crypt(sys.argv[1], crypt.mksalt(crypt.METHOD_SHA256)))' "$password" 2> /dev/null) && break
|
||||||
for python in python3 python python2; do python=$(command -v "$python") && break; done
|
done
|
||||||
password_hash=$("$python" -c 'import crypt, sys; print(crypt.crypt(sys.argv[1], crypt.mksalt(crypt.METHOD_SHA256)))' "$password" 2> /dev/null) || password_hash=
|
}
|
||||||
fi
|
|
||||||
|
|
||||||
$save_preseed << 'EOF'
|
$save_preseed << 'EOF'
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user