From 00c473db782935f53094ad64bda0ceae0cb5dc0e Mon Sep 17 00:00:00 2001 From: Luke Childs Date: Fri, 10 Sep 2021 23:33:10 +0700 Subject: [PATCH] Handle mount script fail (#957) --- scripts/umbrel-os/external-storage/mount | 1 + scripts/umbrel-os/status-server/static/index.html | 5 +++++ scripts/umbrel-os/status-server/static/styles.css | 1 + 3 files changed, 7 insertions(+) diff --git a/scripts/umbrel-os/external-storage/mount b/scripts/umbrel-os/external-storage/mount index 6c1b966..90d4470 100755 --- a/scripts/umbrel-os/external-storage/mount +++ b/scripts/umbrel-os/external-storage/mount @@ -146,6 +146,7 @@ copy_docker_to_external_storage () { main () { $set_status mount started + trap '[[ "$?" != "0" ]] && $set_status mount errored mount-script-exit' EXIT echo "Running external storage mount script..." check_root check_dependencies sed wipefs parted mount sync umount diff --git a/scripts/umbrel-os/status-server/static/index.html b/scripts/umbrel-os/status-server/static/index.html index 34ec82f..d813955 100644 --- a/scripts/umbrel-os/status-server/static/index.html +++ b/scripts/umbrel-os/status-server/static/index.html @@ -76,6 +76,11 @@

The version of UmbrelOS on your microSD card is not compatible with the version of Umbrel on your external drive.

+
+

Error: Mounting external drive failed

+

Something went wrong when trying to connect to the external drive.

+
+

Error: No external drive found

Please connect an external drive (at least 1TB) to a USB 3.0 port (blue color) on your Raspberry Pi and restart your Umbrel.

diff --git a/scripts/umbrel-os/status-server/static/styles.css b/scripts/umbrel-os/status-server/static/styles.css index c56ba01..4334a60 100644 --- a/scripts/umbrel-os/status-server/static/styles.css +++ b/scripts/umbrel-os/status-server/static/styles.css @@ -49,6 +49,7 @@ p { } [data-error="monitor-check"] .error-text.monitor-check, [data-error="semver-mismatch"] .error-text.semver-mismatch, +[data-error="mount-script-exit"] .error-text.mount-script-exit, [data-error="no-block-device"] .error-text.no-block-device, [data-error="multiple-block-devices"] .error-text.multiple-block-devices, [data-error="rebinding-failed"] .error-text.rebinding-failed {