summaryrefslogtreecommitdiff
path: root/sys-cluster/slurm/files/slurmd.initd
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-01-15 01:16:32 +0000
committerV3n3RiX <venerix@koprulu.sector>2024-01-15 01:16:32 +0000
commit7387c23ff485f2416512185bf64584028335b993 (patch)
tree77f6578297f64937d732133db350b968dfe538e3 /sys-cluster/slurm/files/slurmd.initd
parentd8a50857c27d3253561374390ac9ed8c1b65d9bc (diff)
gentoo auto-resync : 15:01:2024 - 01:16:32
Diffstat (limited to 'sys-cluster/slurm/files/slurmd.initd')
-rw-r--r--sys-cluster/slurm/files/slurmd.initd79
1 files changed, 0 insertions, 79 deletions
diff --git a/sys-cluster/slurm/files/slurmd.initd b/sys-cluster/slurm/files/slurmd.initd
deleted file mode 100644
index dd9797c0c7d2..000000000000
--- a/sys-cluster/slurm/files/slurmd.initd
+++ /dev/null
@@ -1,79 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 1999-2018 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-extra_commands="reload"
-
-[[ -f /etc/conf.d/slurm ]] && . /etc/conf.d/slurm
-
-depend() {
- local _need
- [[ ${SLURM_USE_MUNGE} -ne 0 ]] && _need="${_need} munged"
- [[ ${SLURM_USE_YPBIND} -ne 0 ]] && _need="${_need} ypbind"
- after logger
- need ${_need}
-}
-
-create_folder_and_set_permission() {
- folder=${1}
- # Fix permissions (/tmp is wiped at boot)
- if [[ "${folder}" == "/tmp" ]]; then
- eerror "SLURM: folder == ${folder} == /tmp"
- exit
- fi
- if [[ "${folder}" == "/var/tmp" ]]; then
- eerror "SLURM: folder == ${folder} == /var/tmp"
- exit
- fi
- checkpath -d -o slurm:slurm ${folder}
-}
-
-checkconfig() {
- if [ ! -e "/etc/slurm/slurm.conf" ]; then
- eerror "Missing config /etc/slurm/slurm.conf"
- eerror "Customize sample one or generate new by configurator.html"
- 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}"
- done
-}
-
-start() {
- ebegin "Starting slurm daemon"
- checkconfig
- # Slurm does not propagate limits, which can brakes InfiniBand
- # See http://www.open-mpi.org/faq/?category=openfabrics
- # and https://computing.llnl.gov/linux/slurm/faq.html#rlimit
- ulimit -l unlimited
- start-stop-daemon --start --quiet --background \
- --pidfile /run/slurm/slurmd.pid \
- --user root \
- --group root \
- --exec /usr/sbin/slurmd -- ${SLURMD_OPTS}
- eend $?
-}
-
-stop() {
- ebegin "Stopping slurm daemon"
- start-stop-daemon --stop --pidfile /run/slurm/slurmd.pid
- eend $?
-}
-
-reload() {
- ebegin "Reloading slurm daemon configuration"
- start-stop-daemon --signal HUP --pidfile /run/slurm/slurmd.pid
- eend $?
-}