From 5222bdf3e5ec0e5ee1456a7726fc176f5e387c9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gardais=20J=C3=A9r=C3=A9my?= Date: Wed, 6 Jan 2021 12:07:31 +0100 Subject: [PATCH] Maco upgrade temp file is now stored in /opt/maco --- cluster/maco.apply.update.sh | 5 +++-- cluster/maco.check.update.sh | 6 +++--- cluster/sge.enable.host.queue.sh | 5 +++-- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/cluster/maco.apply.update.sh b/cluster/maco.apply.update.sh index ed0491a..06ea4cf 100755 --- a/cluster/maco.apply.update.sh +++ b/cluster/maco.apply.update.sh @@ -17,8 +17,9 @@ readonly NBARGS="${#}" export DEBUG # Maco temp file -readonly MACO_TMP_FILE="/tmp/.maco.upgrade" -readonly MACO_TMP_URGENT_FILE="/tmp/.maco.urgent.upgrade" +readonly MACO_LOCAL_DIR="/opt/maco" +readonly MACO_TMP_FILE="${MACO_LOCAL_DIR}/.maco.upgrade" +readonly MACO_TMP_URGENT_FILE="${MACO_LOCAL_DIR}/.maco.urgent.upgrade" # APT temp file to monitor readonly APT_TMP_FILE="/tmp/.apt.upgrade" diff --git a/cluster/maco.check.update.sh b/cluster/maco.check.update.sh index 24552d2..3d9d7c5 100755 --- a/cluster/maco.check.update.sh +++ b/cluster/maco.check.update.sh @@ -3,7 +3,7 @@ # This script will check if Maco require an upgrade and # will prepare the host in order to apply upgrade : # 1. Disable SGE queue -# 2. Create a temp file (/tmp/.maco.upgrade or /tmp/.maco.urgent.upgrade) +# 2. Create a temp file (${MACO_LOCAL_DIR}/.maco.upgrade or ${MACO_LOCAL_DIR}/.maco.urgent.upgrade) # This script can be call by a cronjob (eg. weekly) # Another script should try to apply upgrades also with cron (eg. hourly) @@ -38,8 +38,8 @@ readonly COLOR_DEBUG="${PURPLE}" ## Maco readonly MACO_LOCAL_DIR="/opt/maco" readonly MACO_INSTALL_DIR="/mnt/store.ipr/InstallProgs/ipr/maco" -readonly MACO_TMP_FILE="/tmp/.maco.upgrade" -readonly MACO_TMP_URGENT_FILE="/tmp/.maco.urgent.upgrade" +readonly MACO_TMP_FILE="${MACO_LOCAL_DIR}/.maco.upgrade" +readonly MACO_TMP_URGENT_FILE="${MACO_LOCAL_DIR}/.maco.urgent.upgrade" # }}} usage() { # {{{ diff --git a/cluster/sge.enable.host.queue.sh b/cluster/sge.enable.host.queue.sh index 10f7441..db2df7e 100755 --- a/cluster/sge.enable.host.queue.sh +++ b/cluster/sge.enable.host.queue.sh @@ -15,8 +15,9 @@ readonly NBARGS="${#}" readonly APT_TMP_FILE="/tmp/.apt.upgrade" # Maco temp file -readonly MACO_TMP_FILE="/tmp/.maco.upgrade" -readonly MACO_TMP_URGENT_FILE="/tmp/.maco.urgent.upgrade" +readonly MACO_LOCAL_DIR="/opt/maco" +readonly MACO_TMP_FILE="${MACO_LOCAL_DIR}/.maco.upgrade" +readonly MACO_TMP_URGENT_FILE="${MACO_LOCAL_DIR}/.maco.urgent.upgrade" # Maco status file readonly MACO_STATUS_FILE="/var/fr.univ-rennes1.ipr.maco.machinestate.txt"