From 06495298c9360c7828046e73c742b3a0d563ab88 Mon Sep 17 00:00:00 2001 From: downtownallday Date: Fri, 14 Oct 2022 15:03:12 -0400 Subject: [PATCH] honor STORAGE_ROOT if already set --- ehdd/ehdd_funcs.sh | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/ehdd/ehdd_funcs.sh b/ehdd/ehdd_funcs.sh index 123d0001..0d5c17ef 100644 --- a/ehdd/ehdd_funcs.sh +++ b/ehdd/ehdd_funcs.sh @@ -8,11 +8,13 @@ ##### -if [ -s /etc/mailinabox.conf ]; then - source /etc/mailinabox.conf - [ $? -eq 0 ] || exit 1 -else - STORAGE_ROOT="/home/${STORAGE_USER:-user-data}" +if [ -z "${STORAGE_ROOT:-}" ]; then + if [ -s /etc/mailinabox.conf ]; then + source /etc/mailinabox.conf + [ $? -eq 0 ] || exit 1 + else + STORAGE_ROOT="/home/${STORAGE_USER:-user-data}" + fi fi EHDD_IMG="$STORAGE_ROOT.HDD"