Browse Source
Pass Umbrel seed into app script during updates (#517)
Co-authored-by: Luke Childs <lukechilds123@gmail.com>
tor-0.4.4.7
Lounès Ksouri
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
8 additions and
1 deletions
-
scripts/app
|
|
@ -37,8 +37,15 @@ list_installed_apps() { |
|
|
|
|
|
|
|
# Deterministically derives 128 bits of cryptographically secure entropy |
|
|
|
derive_entropy () { |
|
|
|
# Make sure we use the seed from the real Umbrel installation if this is |
|
|
|
# an OTA update. |
|
|
|
SEED_FILE="${UMBREL_ROOT}/db/umbrel-seed/seed" |
|
|
|
if [[ ! -f "${SEED_FILE}" ]] && [[ -f "${UMBREL_ROOT}/../.umbrel" ]]; then |
|
|
|
SEED_FILE="${UMBREL_ROOT}/../db/umbrel-seed/seed" |
|
|
|
fi |
|
|
|
|
|
|
|
identifier="${1}" |
|
|
|
umbrel_seed=$(cat "${UMBREL_ROOT}/db/umbrel-seed/seed") || true |
|
|
|
umbrel_seed=$(cat "${SEED_FILE}") || true |
|
|
|
|
|
|
|
if [[ -z "$umbrel_seed" ]] || [[ -z "$identifier" ]]; then |
|
|
|
>&2 echo "Missing derivation parameter, this is unsafe, exiting." |
|
|
|