diff options
Diffstat (limited to 'sys-cluster/slurm/files/slurmd.initd')
-rw-r--r-- | sys-cluster/slurm/files/slurmd.initd | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/sys-cluster/slurm/files/slurmd.initd b/sys-cluster/slurm/files/slurmd.initd index a4a165be87d3..dd9797c0c7d2 100644 --- a/sys-cluster/slurm/files/slurmd.initd +++ b/sys-cluster/slurm/files/slurmd.initd @@ -1,5 +1,5 @@ #!/sbin/openrc-run -# Copyright 1999-2016 Gentoo Foundation +# Copyright 1999-2018 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 extra_commands="reload" @@ -37,9 +37,17 @@ checkconfig() { fi # Make sure folders exists . /etc/slurm/slurm.conf - folders=(${SlurmdSpoolDir} `dirname ${SlurmctldLogFile}` `dirname ${SlurmctldPidFile}` `dirname ${SlurmdLogFile}` `dirname ${SlurmdPidFile}` ${SlurmdSpoolDir} ${StateSaveLocation}) - for folder in ${folders[*]}; do - create_folder_and_set_permission ${folder} + folders=( + ${SlurmdSpoolDir} + $(dirname ${SlurmctldLogFile}) + $(dirname ${SlurmctldPidFile}) + $(dirname ${SlurmdLogFile}) + $(dirname ${SlurmdPidFile}) + ${SlurmdSpoolDir} + ${StateSaveLocation} + ) + for folder in ${folders[@]}; do + create_folder_and_set_permission "${folder}" done } @@ -51,7 +59,7 @@ start() { # and https://computing.llnl.gov/linux/slurm/faq.html#rlimit ulimit -l unlimited start-stop-daemon --start --quiet --background \ - --pidfile /var/run/slurm/slurmd.pid \ + --pidfile /run/slurm/slurmd.pid \ --user root \ --group root \ --exec /usr/sbin/slurmd -- ${SLURMD_OPTS} @@ -60,12 +68,12 @@ start() { stop() { ebegin "Stopping slurm daemon" - start-stop-daemon --stop --pidfile /var/run/slurm/slurmd.pid + start-stop-daemon --stop --pidfile /run/slurm/slurmd.pid eend $? } reload() { ebegin "Reloading slurm daemon configuration" - start-stop-daemon --signal HUP --pidfile /var/run/slurm/slurmd.pid + start-stop-daemon --signal HUP --pidfile /run/slurm/slurmd.pid eend $? } |