Merge pull request #5200 from HiassofT/le10-pastekodi

pastekodi cleanup and improvements
This commit is contained in:
mglae 2021-03-05 23:25:15 +01:00 committed by GitHub
commit 05575a6753
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -14,6 +14,18 @@ cat_file() {
fi fi
} }
ls_dir() {
if [ -d "${1}" ]; then
ls -lA "${1}" | cat_data "${1}"
fi
}
ls_dir_recursive() {
if [ -d "${1}" ]; then
ls -lAR "${1}" | cat_data "${1}"
fi
}
usage() { usage() {
[ -n "${1}" ] && echo "Unknown argument: ${1}" [ -n "${1}" ] && echo "Unknown argument: ${1}"
cat <<EOF cat <<EOF
@ -65,17 +77,15 @@ fi
fi fi
if [ "${LIBREELEC_PROJECT}" = "RPi" ]; then if [ "${LIBREELEC_PROJECT}" = "RPi" ]; then
echo "RPi Hardware Revision: $(vcgencmd otp_dump | grep 30: | cut -d: -f2)" echo "RPi Hardware Revision: $(vcgencmd otp_dump | grep 30: | cut -d: -f2)"
echo "RPi $(vcgencmd get_throttled)"
fi fi
cat_file "${LOG_FILE}" cat_file "${LOG_FILE}"
journalctl -a | cat_data "journalctl -a" journalctl -a -o short-precise | cat_data "journalctl -a"
if [ "${LIBREELEC_PROJECT}" = "RPi" ]; then if [ "${LIBREELEC_PROJECT}" = "RPi" ]; then
bootloader_version="$(vcgencmd bootloader_version)" vcgencmd bootloader_version | cat_data "Bootloader version"
if ! echo "${bootloader_version}" | grep -q "Command not registered"; then
echo "${bootloader_version}" | cat_data "Bootloader version"
fi
fi fi
cat_file "/flash/config.txt" # RPi cat_file "/flash/config.txt" # RPi
@ -92,6 +102,10 @@ fi
cat_file "${KODI_ROOT}/.smb/user.conf" cat_file "${KODI_ROOT}/.smb/user.conf"
cat_file "/run/samba/smb.conf" cat_file "/run/samba/smb.conf"
ls_dir /storage/.config
ls_dir_recursive /storage/.config/system.d
ls_dir /storage/.config/udev.rules.d
pem_sys="$(sha256sum /etc/ssl/cacert.pem.system | cut -d' ' -f1)" pem_sys="$(sha256sum /etc/ssl/cacert.pem.system | cut -d' ' -f1)"
pem_run="$(sha256sum /run/libreelec/cacert.pem | cut -d' ' -f1)" pem_run="$(sha256sum /run/libreelec/cacert.pem | cut -d' ' -f1)"
if [ "${pem_sys}" = "${pem_run}" ]; then if [ "${pem_sys}" = "${pem_run}" ]; then