From 2f398e18bc708f4b03b3616b1d85262a06ce1018 Mon Sep 17 00:00:00 2001 From: Benda Xu Date: Thu, 17 Oct 2024 10:13:58 +0800 Subject: sys-cluster/slurm: drop bashism in the initd script. Remove duplicated directories. Suggested-by: Michael Orlitzky Signed-off-by: Benda Xu --- sys-cluster/slurm/files/slurmd.initd | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'sys-cluster') diff --git a/sys-cluster/slurm/files/slurmd.initd b/sys-cluster/slurm/files/slurmd.initd index dd9797c0c7d2..c912468e8152 100644 --- a/sys-cluster/slurm/files/slurmd.initd +++ b/sys-cluster/slurm/files/slurmd.initd @@ -37,16 +37,14 @@ checkconfig() { fi # Make sure folders exists . /etc/slurm/slurm.conf - folders=( - ${SlurmdSpoolDir} - $(dirname ${SlurmctldLogFile}) - $(dirname ${SlurmctldPidFile}) - $(dirname ${SlurmdLogFile}) - $(dirname ${SlurmdPidFile}) - ${SlurmdSpoolDir} + + for folder in ${SlurmdSpoolDir} \ + $(dirname ${SlurmctldLogFile}) \ + $(dirname ${SlurmctldPidFile}) \ + $(dirname ${SlurmdLogFile}) \ + $(dirname ${SlurmdPidFile}) \ ${StateSaveLocation} - ) - for folder in ${folders[@]}; do + do create_folder_and_set_permission "${folder}" done } -- cgit v1.2.3-65-gdbad