From e14c6e6b51c934c107f7cc624fa8785b93291d29 Mon Sep 17 00:00:00 2001
From: Tim Kreuzer <t.kreuzer@fz-juelich.de>
Date: Thu, 27 Jun 2024 18:04:19 +0200
Subject: [PATCH] add more just mounts per default

---
 lmod/files/mnt.sh           | 8 ++++++++
 lmod/files/start_jupyter.sh | 9 +++++++++
 2 files changed, 17 insertions(+)

diff --git a/lmod/files/mnt.sh b/lmod/files/mnt.sh
index 53eacf1..c03fce3 100644
--- a/lmod/files/mnt.sh
+++ b/lmod/files/mnt.sh
@@ -5,6 +5,14 @@ JUST_HOME_PATH=/mnt/JUST_HOME
 mkdir -p ${JUST_HOME_PATH}
 chown ${NB_UID}:${NB_GID} ${JUST_HOME_PATH}
 
+mkdir -p /p/data1
+chown ${NB_UID}:${NB_GID} /p/data1
+
+mkdir -p /p/project1
+chown ${NB_UID}:${NB_GID} /p/project1
+
+mkdir -p /p/home/jusers
+chown ${NB_UID}:${NB_GID} /p/home/jusers
 
 ## add B2DROP support
 B2DROP_PATH=/mnt/B2DROP
diff --git a/lmod/files/start_jupyter.sh b/lmod/files/start_jupyter.sh
index 3dde51b..592cb29 100644
--- a/lmod/files/start_jupyter.sh
+++ b/lmod/files/start_jupyter.sh
@@ -77,6 +77,15 @@ mount_just () {
       echo "$(date) - Python script ended with exit code $EC"
     fi
   fi
+  if [[ -f /tmp/custom/mount_home_ro.sh ]]; then
+    /bin/bash /tmp/custom/mount_home_ro.sh 
+  fi
+  if [[ -f /tmp/custom/mount_project_ro.sh ]]; then
+    /bin/bash /tmp/custom/mount_project_ro.sh 
+  fi
+  if [[ -f /tmp/custom/mount_data_ro.sh ]]; then
+    /bin/bash /tmp/custom/mount_data_ro.sh 
+  fi
   echo "$(date) - Mount JUST done"
 }
 
-- 
GitLab