From abb4d4198eda5076eab42e27c16c0233b343b30f Mon Sep 17 00:00:00 2001
From: Thomas Juerges <4-jurges@users.noreply.git.astron.nl>
Date: Wed, 13 May 2020 09:52:26 +0200
Subject: [PATCH] Also allow /opt/tango and /opt/lofar as store/load paths

---
 tools/ConfigDb/load_ConfigDb.sh   | 6 +++---
 tools/ConfigDb/update_ConfigDb.sh | 6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/tools/ConfigDb/load_ConfigDb.sh b/tools/ConfigDb/load_ConfigDb.sh
index f60d32501..1326db28f 100755
--- a/tools/ConfigDb/load_ConfigDb.sh
+++ b/tools/ConfigDb/load_ConfigDb.sh
@@ -1,9 +1,9 @@
 if [ ${#} -ne 1 ]; then
     echo "You must provide a file name for the TANGO_HOST DB dump!"
     exit -1
-# Check if the filename begins with /hosthome/:
-elif [ ${1:0:10} != /hosthome/ ]; then
-    echo "You must provide a filename that begins with \"/hosthome/\".  Why is that?  Because the file needs to be stored from within the container to the hosts file system and your HOME directory will be mounted as /hosthome."
+# Check if the filename begins with /hosthome/, /opt/tango or /opt/lofar:
+elif [ ${1:0:10} != /hosthome/ -a ${1:0:11} != /opt/tango/ -a ${1:0:11} != /opt/lofar/ ]; then
+    echo "You must provide a full file path that begins with one of \"/hosthome/\", \"/opt/tango/\" or \"/opt/lofar/\".  Why is that?  Because the file has to be loaded from the Docker host's file system that is mounted in the container."
     exit -2
 fi
 
diff --git a/tools/ConfigDb/update_ConfigDb.sh b/tools/ConfigDb/update_ConfigDb.sh
index d17af1ad1..276b33ee7 100755
--- a/tools/ConfigDb/update_ConfigDb.sh
+++ b/tools/ConfigDb/update_ConfigDb.sh
@@ -1,9 +1,9 @@
 if [ ${#} -ne 1 ]; then
     echo "You must provide a file name for the TANGO_HOST DB dump!"
     exit -1
-# Check if the filename begins with /hosthome/:
-elif [ ${1:0:10} != /hosthome/ ]; then
-    echo "You must provide a filename that begins with \"/hosthome/\".  Why is that?  Because the file needs to be stored from within the container to the hosts file system and your HOME directory will be mounted as /hosthome."
+# Check if the filename begins with /hosthome/, /opt/tango or /opt/lofar:
+elif [ ${1:0:10} != /hosthome/ -a ${1:0:11} != /opt/tango/ -a ${1:0:11} != /opt/lofar/ ]; then
+    echo "You must provide a full file path that begins with one of \"/hosthome/\", \"/opt/tango/\" or \"/opt/lofar/\".  Why is that?  Because the file has to be stored to the Docker host's file system that is mounted in the container."
     exit -2
 fi
 
-- 
GitLab