Browse Source

Include mount check in mount script (#125)

check-external-filesystem
Luke Childs 4 years ago
committed by GitHub
parent
commit
de71301e6d
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 10
      scripts/umbrel-os/external-storage/is-mounted
  2. 2
      scripts/umbrel-os/external-storage/mount

10
scripts/umbrel-os/external-storage/is-mounted

@ -1,10 +0,0 @@
#!/usr/bin/env bash
set -euo pipefail
# This script returns a non-zero exit code if $UMBREL_ROOT is NOT
# mounted on external storage.
UMBREL_ROOT="$(readlink -f $(dirname "${BASH_SOURCE[0]}")/../../..)"
df -h "${UMBREL_ROOT}" | grep --quiet '/dev/sd'

2
scripts/umbrel-os/external-storage/mount

@ -138,7 +138,7 @@ main () {
echo "Checking Umbrel root is now on external storage..."
sync
sleep 1
"${UMBREL_ROOT}/scripts/umbrel-os/external-storage/is-mounted"
df -h "${UMBREL_ROOT}" | grep --quiet '/dev/sd'
echo "Mount script completed successfully!"
}

Loading…
Cancel
Save