diff options
author | Justin Lecher <jlec@gentoo.org> | 2018-11-10 13:25:08 +0000 |
---|---|---|
committer | Justin Lecher <jlec@gentoo.org> | 2018-11-10 13:25:37 +0000 |
commit | 9aa4f6dd9345daba4b121c66b31548c67bcac400 (patch) | |
tree | 31508b6c902d1c8aed1fd11698f6a233290f8d27 /sys-cluster/slurm/files | |
parent | sys-auth/munge: Update init (diff) | |
download | gentoo-9aa4f6dd9345daba4b121c66b31548c67bcac400.tar.gz gentoo-9aa4f6dd9345daba4b121c66b31548c67bcac400.tar.bz2 gentoo-9aa4f6dd9345daba4b121c66b31548c67bcac400.zip |
sys-cluster/slurm: Fix init stuff
Signed-off-by: Justin Lecher <jlec@gentoo.org>
Package-Manager: Portage-2.3.51, Repoman-2.3.11
Diffstat (limited to 'sys-cluster/slurm/files')
-rw-r--r-- | sys-cluster/slurm/files/slurmctld.initd | 26 | ||||
-rw-r--r-- | sys-cluster/slurm/files/slurmd.initd | 22 | ||||
-rw-r--r-- | sys-cluster/slurm/files/slurmdbd.initd | 22 |
3 files changed, 47 insertions, 23 deletions
diff --git a/sys-cluster/slurm/files/slurmctld.initd b/sys-cluster/slurm/files/slurmctld.initd index e87dfdb83ad3..5cb5888fa153 100644 --- a/sys-cluster/slurm/files/slurmctld.initd +++ b/sys-cluster/slurm/files/slurmctld.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" @@ -25,7 +25,7 @@ create_folder_and_set_permission() { eerror "SLURM: folder == ${folder} == /var/tmp" exit fi - checkpath -d -o slurm:slurm ${folder} + checkpath -d -o slurm:slurm "${folder}" } checkconfig() { @@ -35,12 +35,20 @@ checkconfig() { eerror "in slurm doc directory" return 1 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 } @@ -48,7 +56,7 @@ start() { ebegin "Starting slurm control daemon" checkconfig start-stop-daemon --start --quiet --background \ - --pidfile /var/run/slurm/slurmctld.pid \ + --pidfile /run/slurm/slurmctld.pid \ --user slurm \ --group slurm \ --exec /usr/sbin/slurmctld -- ${SLURMCTLD_OPTS} @@ -57,12 +65,12 @@ start() { stop() { ebegin "Stopping slurm control daemon" - start-stop-daemon --stop --pidfile /var/run/slurm/slurmctld.pid + start-stop-daemon --stop --pidfile /run/slurm/slurmctld.pid eend $? } reload() { ebegin "Reloading slurm daemon configuration" - start-stop-daemon --signal HUP --pidfile /var/run/slurm/slurmctld.pid + start-stop-daemon --signal HUP --pidfile /run/slurm/slurmctld.pid eend $? } 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 $? } diff --git a/sys-cluster/slurm/files/slurmdbd.initd b/sys-cluster/slurm/files/slurmdbd.initd index 296afaf9421c..27b5102101cb 100644 --- a/sys-cluster/slurm/files/slurmdbd.initd +++ b/sys-cluster/slurm/files/slurmdbd.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" @@ -36,9 +36,17 @@ checkconfig() { # 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 } @@ -46,7 +54,7 @@ start() { ebegin "Starting slurmdb daemon" checkconfig start-stop-daemon --start --quiet --background \ - --pidfile /var/run/slurm/slurmdbd.pid \ + --pidfile /run/slurm/slurmdbd.pid \ --user slurm \ --group slurm \ --exec /usr/sbin/slurmdbd -- ${SLURMD_OPTS} @@ -55,12 +63,12 @@ start() { stop() { ebegin "Stopping slurmdb daemon" - start-stop-daemon --stop --pidfile /var/run/slurm/slurmdbd.pid + start-stop-daemon --stop --pidfile /run/slurm/slurmdbd.pid eend $? } reload() { ebegin "Reloading slurmdb daemon configuration" - start-stop-daemon --signal HUP --pidfile /var/run/slurm/slurmdbd.pid + start-stop-daemon --signal HUP --pidfile /run/slurm/slurmdbd.pid eend $? } |