From cb04275d89efb89f8948306d6284eff7dcf50f7d Mon Sep 17 00:00:00 2001
From: Jan David Mol <mol@astron.nl>
Date: Sun, 3 Oct 2021 19:32:16 +0000
Subject: [PATCH] L2SS-394: Remove path recasting magic by just copying the
 config into the container and using it from there

---
 sbin/load_ConfigDb.sh   | 9 +++------
 sbin/update_ConfigDb.sh | 9 +++------
 2 files changed, 6 insertions(+), 12 deletions(-)

diff --git a/sbin/load_ConfigDb.sh b/sbin/load_ConfigDb.sh
index f7c753689..e62092969 100755
--- a/sbin/load_ConfigDb.sh
+++ b/sbin/load_ConfigDb.sh
@@ -1,13 +1,10 @@
-function help()
-{
-    echo -e "\nERROR:  ${1}\nYou must provide a file that can be accessed from within the Docker container.  This is possible for files that\n\t- Have a path in \${HOME} or\n\t- Have a full file path that begins with one of \"/hosthome/\", \"/opt/lofar2.0/tango/\" or \"/opt/lofar2.0/\".\n\nWhy is that?  Because the file will be loaded from within the Docker container and only some of the host's file system directories are mounted in the container."
-    exit -2
-}
+#!/bin/bash
 
 if [ ${#} -eq 1 ]; then
     file=${1}
 else
-    help "A file name must be provided."
+    echo "A file name must be provided."
+    exit 1
 fi
 
 # copy file into container to read it from container, as the file's location
diff --git a/sbin/update_ConfigDb.sh b/sbin/update_ConfigDb.sh
index 25cb31a85..90cf92c24 100755
--- a/sbin/update_ConfigDb.sh
+++ b/sbin/update_ConfigDb.sh
@@ -1,13 +1,10 @@
-function help()
-{
-    echo -e "\nERROR:  ${1}\nYou must provide a file that can be accessed from within the Docker container.  This is possible for files that\n\t- Have a path in \${HOME} or\n\t- Have a full file path that begins with one of \"/hosthome/\", \"/opt/lofar2.0/tango/\" or \"/opt/lofar2.0/\".\n\nWhy is that?  Because the file will be loaded from within the Docker container and only some of the host's file system directories are mounted in the container."
-    exit -2
-}
+#!/bin/bash
 
 if [ ${#} -eq 1 ]; then
     file=${1}
 else
-    help "A file name must be provided."
+    echo "A file name must be provided."
+    exit 1
 fi
 
 # copy file into container to read it from container, as the file's location
-- 
GitLab