Browse Source

v0.2.69

master
Luke Childs 4 years ago
parent
commit
1de3d23565
  1. 4
      info.json
  2. 2
      scripts/update/00-run.sh
  3. 2
      scripts/update/01-run.sh
  4. 2
      scripts/update/02-run.sh
  5. 2
      scripts/update/03-run.sh
  6. 21
      scripts/update/check-memory

4
info.json

@ -1,6 +1,6 @@
{
"version": "0.2.10",
"name": "Umbrel v0.2.10",
"version": "0.2.69",
"name": "Umbrel v0.2.69",
"requires": ">=0.2.1",
"notes": "This update brings some minor bugfixes and adds monitoring functionality to ensure your external storage device is running reliably."
}

2
scripts/update/00-run.sh

@ -4,7 +4,7 @@ set -euo pipefail
RELEASE=$1
UMBREL_ROOT=$2
./check-memory "${UMBREL_ROOT}"
./check-memory "${RELEASE}" "${UMBREL_ROOT}" "firstrun"
echo
echo "======================================="

2
scripts/update/01-run.sh

@ -4,7 +4,7 @@ set -euo pipefail
RELEASE=$1
UMBREL_ROOT=$2
./check-memory "${UMBREL_ROOT}"
./check-memory "${RELEASE}" "${UMBREL_ROOT}" "notfirstrun"
# Only used on Umbrel OS
SD_CARD_UMBREL_ROOT="/sd-root${UMBREL_ROOT}"

2
scripts/update/02-run.sh

@ -4,7 +4,7 @@ set -euo pipefail
RELEASE=$1
UMBREL_ROOT=$2
./check-memory "${UMBREL_ROOT}"
./check-memory "${RELEASE}" "${UMBREL_ROOT}" "notfirstrun"
echo
echo "======================================="

2
scripts/update/03-run.sh

@ -4,7 +4,7 @@ set -euo pipefail
RELEASE=$1
UMBREL_ROOT=$2
./check-memory "${UMBREL_ROOT}"
./check-memory "${RELEASE}" "${UMBREL_ROOT}" "notfirstrun"
echo
echo "======================================="

21
scripts/update/check-memory

@ -1,16 +1,23 @@
#!/usr/bin/env bash
set -euo pipefail
UMBREL_ROOT=$1
RELEASE=$1
UMBREL_ROOT=$2
first_run=$3
# Abort on low memory devices
if true; then
memory_error="Sorry, this update isn't compatible with your device, it requires at least 2GB RAM."
echo "${memory_error}"
cat <<EOF > "$UMBREL_ROOT"/statuses/update-status.json
{"state": "failed", "progress": 100, "description": "${memory_error}", "updateTo": ""}
if [[ "${first_run}" == "firstrun" ]]; then
cat <<EOF > "$UMBREL_ROOT"/statuses/update-status.json
{"state": "installing", "progress": 20, "description": "Checking device memory", "updateTo": "${RELEASE}"}
EOF
# Sleep for a few seconds so the failure gets a chance to be picked up by the UI
sleep 5
# Sleep for a few seconds so the user has been redirected to the update screen
sleep 10
memory_error="Sorry, this update isn't compatible with your device, it requires at least 2GB RAM."
echo "${memory_error}"
cat <<EOF > "$UMBREL_ROOT"/statuses/update-status.json
{"state": "failed", "progress": 100, "description": "${memory_error}", "updateTo": "${RELEASE}"}
EOF
fi
exit 1
fi

Loading…
Cancel
Save