Only rebind WIFI on 3566, fix system update checks.
This commit is contained in:
parent
b68dd38262
commit
1a16e19a0d
4 changed files with 16 additions and 20 deletions
|
@ -95,7 +95,7 @@ case ${1} in
|
|||
exit 0
|
||||
;;
|
||||
[0-9][0-9]*)
|
||||
LATEST_RELEASE_TAG=${1}
|
||||
UPDATE_PACKAGE=${1}
|
||||
FORCE=1
|
||||
;;
|
||||
esac
|
||||
|
@ -118,14 +118,12 @@ then
|
|||
check_space available .update GAMES 4096000 2>/dev/null
|
||||
fi
|
||||
|
||||
if [ -z "${LATEST_RELEASE_TAG}" ]
|
||||
if [ -z "${UPDATE_PACKAGE}" ]
|
||||
then
|
||||
curl -o /tmp/release.data -H 'Cache-Control: no-cache' -Ls "${GIT_API}/releases"
|
||||
LATEST_RELEASE_TAG=$(cat /tmp/release.data | python -c "import sys, json; print(json.load(sys.stdin)[0]['tag_name'])")
|
||||
UPDATE_PACKAGE=$((grep "${OS_NAME}-${HW_DEVICE}.${HW_ARCH}.*tar.sha256" /tmp/release.data >/dev/null 2>&1 && echo true ) || echo false)
|
||||
if [ "${OS_VERSION}" -ge "${LATEST_RELEASE_TAG}" ] \
|
||||
&& [ ! "${FORCE}" == "1" ] \
|
||||
|| [ ! "${UPDATE_PACKAGE}" == "true" ]
|
||||
UPDATE_PACKAGE=$(awk 'BEGIN {FS="\""} /'${OS_NAME}-${HW_DEVICE}.${HW_ARCH}'.*tar/ {print $4; exit}' /tmp/release.data | sed -e "s~${OS_NAME}-${HW_DEVICE}.${HW_ARCH}-~~g;s~.tar$~~g")
|
||||
if [ "${UPDATE_PACKAGE}" == "${OS_VERSION}" ] \
|
||||
|| [ "${FORCE}" == "1" ]
|
||||
then
|
||||
cleanup
|
||||
echo "No new updates are available..."
|
||||
|
@ -134,15 +132,15 @@ then
|
|||
fi
|
||||
fi
|
||||
|
||||
echo -e "\nFetching: ${OS_NAME}-${HW_DEVICE}.${HW_ARCH}-${LATEST_RELEASE_TAG}.${EXTENSION}"
|
||||
curl -Lo "${UPDATE_PATH}/${OS_NAME}-${HW_DEVICE}.${HW_ARCH}-${LATEST_RELEASE_TAG}.${EXTENSION}" "${GIT_REPO}/releases/download/${LATEST_RELEASE_TAG}/${OS_NAME}-${HW_DEVICE}.${HW_ARCH}-${LATEST_RELEASE_TAG}.tar"
|
||||
echo -e "Fetching: ${OS_NAME}-${HW_DEVICE}.${HW_ARCH}-${LATEST_RELEASE_TAG}.${EXTENSION}.sha256"
|
||||
curl -Lo "${UPDATE_PATH}/${OS_NAME}-${HW_DEVICE}.${HW_ARCH}-${LATEST_RELEASE_TAG}.${EXTENSION}.sha256" "${GIT_REPO}/releases/download/${LATEST_RELEASE_TAG}/${OS_NAME}-${HW_DEVICE}.${HW_ARCH}-${LATEST_RELEASE_TAG}.tar.sha256"
|
||||
echo -e "\nFetching: ${OS_NAME}-${HW_DEVICE}.${HW_ARCH}-${UPDATE_PACKAGE}.${EXTENSION}"
|
||||
curl -Lo "${UPDATE_PATH}/${OS_NAME}-${HW_DEVICE}.${HW_ARCH}-${UPDATE_PACKAGE}.${EXTENSION}" "${GIT_REPO}/releases/download/${UPDATE_PACKAGE}/${OS_NAME}-${HW_DEVICE}.${HW_ARCH}-${UPDATE_PACKAGE}.tar"
|
||||
echo -e "Fetching: ${OS_NAME}-${HW_DEVICE}.${HW_ARCH}-${UPDATE_PACKAGE}.${EXTENSION}.sha256"
|
||||
curl -Lo "${UPDATE_PATH}/${OS_NAME}-${HW_DEVICE}.${HW_ARCH}-${UPDATE_PACKAGE}.${EXTENSION}.sha256" "${GIT_REPO}/releases/download/${UPDATE_PACKAGE}/${OS_NAME}-${HW_DEVICE}.${HW_ARCH}-${UPDATE_PACKAGE}.tar.sha256"
|
||||
|
||||
echo -e "\nVerifying download, please wait..."
|
||||
# Verify
|
||||
MYSUM=$(sha256sum ${UPDATE_PATH}/${OS_NAME}-${HW_DEVICE}.${HW_ARCH}-${LATEST_RELEASE_TAG}.${EXTENSION} | awk '{print $1}')
|
||||
DLSUM=$(cat ${UPDATE_PATH}/${OS_NAME}-${HW_DEVICE}.${HW_ARCH}-${LATEST_RELEASE_TAG}.${EXTENSION}.sha256 | awk '{print $1}')
|
||||
MYSUM=$(sha256sum ${UPDATE_PATH}/${OS_NAME}-${HW_DEVICE}.${HW_ARCH}-${UPDATE_PACKAGE}.${EXTENSION} | awk '{print $1}')
|
||||
DLSUM=$(cat ${UPDATE_PATH}/${OS_NAME}-${HW_DEVICE}.${HW_ARCH}-${UPDATE_PACKAGE}.${EXTENSION}.sha256 | awk '{print $1}')
|
||||
|
||||
if [ ! "${MYSUM}" == "${DLSUM}" ]
|
||||
then
|
||||
|
|
|
@ -41,13 +41,11 @@ ONLINE_STATUS=$(check_network)
|
|||
if [ "${ONLINE_STATUS}" == true ]
|
||||
then
|
||||
curl -o /tmp/release.data -H 'Cache-Control: no-cache' -Ls "${GIT_API}/releases"
|
||||
LATEST_RELEASE_TAG=$(cat /tmp/release.data | python -c "import sys, json; print(json.load(sys.stdin)[0]['tag_name'])")
|
||||
UPDATE_PACKAGE=$((grep "${OS_NAME}-${HW_DEVICE}.${HW_ARCH}.*tar.sha256" /tmp/release.data >/dev/null 2>&1 && echo true ) || echo false)
|
||||
if [ "${OS_VERSION}" -lt "${LATEST_RELEASE_TAG}" ] \
|
||||
|| [ "${FORCE}" == "1" ] \
|
||||
&& [ "${UPDATE_PACKAGE}" == "true" ]
|
||||
UPDATE_PACKAGE=$(awk 'BEGIN {FS="\""} /'${OS_NAME}-${HW_DEVICE}.${HW_ARCH}'.*tar/ {print $4; exit}' /tmp/release.data | sed -e "s~${OS_NAME}-${HW_DEVICE}.${HW_ARCH}-~~g;s~.tar$~~g")
|
||||
if [ ! "${UPDATE_PACKAGE}" == "${OS_VERSION}" ] \
|
||||
|| [ "${FORCE}" == "1" ]
|
||||
then
|
||||
echo "${LATEST_RELEASE_TAG}"
|
||||
echo "${UPDATE_PACKAGE}"
|
||||
cleanup
|
||||
exit 0
|
||||
fi
|
||||
|
|
|
@ -7,7 +7,7 @@ PKG_VERSION=""
|
|||
PKG_LICENSE="various"
|
||||
PKG_SITE="https://libreelec.tv"
|
||||
PKG_URL=""
|
||||
PKG_DEPENDS_TARGET="toolchain connman hostapd netbase ethtool openssh iw rsync tailscale avahi miniupnpc nss-mdns bluetool speedtest-cli"
|
||||
PKG_DEPENDS_TARGET="toolchain connman rfkill hostapd netbase ethtool openssh iw rsync tailscale avahi miniupnpc nss-mdns bluetool speedtest-cli"
|
||||
PKG_SECTION="virtual"
|
||||
PKG_LONGDESC="Metapackage for various packages to install network support"
|
||||
|
||||
|
|
Loading…
Reference in a new issue