mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-28 21:26:49 +00:00
functions: add_user: replace python with openssl
python's crypt module is deprecated in 3.11 and to be removed in 3.13. Replace its usage with openssl's passwd. Signed-off-by: Ian Leonard <antonlacon@gmail.com>
This commit is contained in:
parent
5132be1a1d
commit
79a4a5dd8c
@ -1612,7 +1612,7 @@ add_user() {
|
||||
if [ "$PASSWORD" = "x" ]; then
|
||||
PASSWORD="*"
|
||||
else
|
||||
PASSWORD=$(python -c "import crypt; print(crypt.crypt('$PASSWORD', crypt.mksalt(crypt.METHOD_SHA512)))")
|
||||
PASSWORD=$(openssl passwd -6 "${PASSWORD}")
|
||||
fi
|
||||
if ! grep -q "^$1:" ${INSTALL}/usr/cache/shadow; then
|
||||
echo "$1:$PASSWORD:::::::" >> ${INSTALL}/usr/cache/shadow
|
||||
|
@ -7,7 +7,7 @@ PKG_VERSION=""
|
||||
PKG_LICENSE="GPL"
|
||||
PKG_SITE="https://libreelec.tv"
|
||||
PKG_URL=""
|
||||
PKG_DEPENDS_HOST="autoconf:host autoconf-archive:host automake:host bison:host configtools:host cmake:host flex:host intltool:host libtool:host ninja:host make:host meson:host p7zip:host pigz:host sed:host xmlstarlet:host xz:host"
|
||||
PKG_DEPENDS_HOST="autoconf:host autoconf-archive:host automake:host bison:host configtools:host cmake:host flex:host intltool:host libtool:host ninja:host make:host meson:host openssl:host p7zip:host pigz:host sed:host xmlstarlet:host xz:host"
|
||||
PKG_DEPENDS_TARGET="toolchain:host gcc:host"
|
||||
PKG_SECTION="virtual"
|
||||
PKG_LONGDESC="LibreELEC.tv' toolchain to compile all packages"
|
||||
|
Loading…
x
Reference in New Issue
Block a user