mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-27 20:56:55 +00:00
shadow: move from .config to .cache
This commit is contained in:
parent
dcd653b5a4
commit
dc30a81d1c
@ -369,15 +369,16 @@ add_user() {
|
|||||||
echo "$1:x:$3:$4:$5:$6:$7" >> ${INSTALL}/etc/passwd
|
echo "$1:x:$3:$4:$5:$6:$7" >> ${INSTALL}/etc/passwd
|
||||||
fi
|
fi
|
||||||
|
|
||||||
touch ${INSTALL}/usr/config/shadow
|
mkdir -p ${INSTALL}/usr/cache
|
||||||
ln -sf /storage/.config/shadow ${INSTALL}/etc/shadow
|
touch ${INSTALL}/usr/cache/shadow
|
||||||
|
ln -sf /storage/.cache/shadow ${INSTALL}/etc/shadow
|
||||||
|
|
||||||
PASSWORD="$2"
|
PASSWORD="$2"
|
||||||
if [ "$PASSWORD" = "x" ]; then
|
if [ "$PASSWORD" = "x" ]; then
|
||||||
PASSWORD="*"
|
PASSWORD="*"
|
||||||
fi
|
fi
|
||||||
if ! grep -q "^$1:" ${INSTALL}/usr/config/shadow; then
|
if ! grep -q "^$1:" ${INSTALL}/usr/cache/shadow; then
|
||||||
echo "$1:$PASSWORD:::::::" >> ${INSTALL}/usr/config/shadow
|
echo "$1:$PASSWORD:::::::" >> ${INSTALL}/usr/cache/shadow
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -196,7 +196,7 @@ post_install() {
|
|||||||
ROOT_PWD="`$TOOLCHAIN/bin/cryptpw -m sha512 $ROOT_PASSWORD`"
|
ROOT_PWD="`$TOOLCHAIN/bin/cryptpw -m sha512 $ROOT_PASSWORD`"
|
||||||
|
|
||||||
echo "chmod 4755 $INSTALL/usr/bin/busybox" >> $FAKEROOT_SCRIPT
|
echo "chmod 4755 $INSTALL/usr/bin/busybox" >> $FAKEROOT_SCRIPT
|
||||||
echo "chmod 000 $INSTALL/usr/config/shadow" >> $FAKEROOT_SCRIPT
|
echo "chmod 000 $INSTALL/usr/cache/shadow" >> $FAKEROOT_SCRIPT
|
||||||
|
|
||||||
add_user root "$ROOT_PWD" 0 0 "Root User" "/storage" "/bin/sh"
|
add_user root "$ROOT_PWD" 0 0 "Root User" "/storage" "/bin/sh"
|
||||||
add_group root 0
|
add_group root 0
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
################################################################################
|
################################################################################
|
||||||
# This file is part of LibreELEC - http://www.libreelec.tv
|
# This file is part of LibreELEC - https://libreelec.tv
|
||||||
# Copyright (C) 2017 Team LibreELEC
|
# Copyright (C) 2017-present Team LibreELEC
|
||||||
#
|
#
|
||||||
# LibreELEC is free software: you can redistribute it and/or modify
|
# LibreELEC is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
@ -24,5 +24,3 @@ done
|
|||||||
|
|
||||||
# Copy config files, but don't overwrite - this should replace our sample files
|
# Copy config files, but don't overwrite - this should replace our sample files
|
||||||
false | cp -iRp /usr/config/* /storage/.config/ &>/dev/null
|
false | cp -iRp /usr/config/* /storage/.config/ &>/dev/null
|
||||||
|
|
||||||
[ -f /storage/.config/shadow ] && chmod 000 /storage/.config/shadow || true
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user