Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Slurm
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
tud-zih-energy
Slurm
Commits
00fa790c
Commit
00fa790c
authored
20 years ago
by
Moe Jette
Browse files
Options
Downloads
Patches
Plain Diff
Parameterize some file locations for easier porting (per Chris Holmes/HP).
parent
f63cc693
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
etc/init.d.slurm
+17
-9
17 additions, 9 deletions
etc/init.d.slurm
with
17 additions
and
9 deletions
etc/init.d.slurm
+
17
−
9
View file @
00fa790c
...
...
@@ -16,6 +16,11 @@
# $Id$
BINDIR
=
/usr/bin
CONFDIR
=
/etc/slurm
LIBDIR
=
/usr/lib
SBINDIR
=
/usr/sbin
# Source function library.
[
-f
/etc/rc.d/init.d/functions
]
||
exit
0
.
/etc/rc.d/init.d/functions
...
...
@@ -28,14 +33,17 @@ else
SLURMD_OPTIONS
=
""
fi
[
-f
/etc/slurm/slurm.conf
]
||
exit
1
[
-f
$CONFDIR
/slurm.conf
]
||
exit
1
# setup library paths for slurm and munge support
export
LD_LIBRARY_PATH
=
"
$LIBDIR
:
$LD_LIBRARY_PATH
"
RETVAL
=
0
start
()
{
echo
-n
"starting
$1
: "
unset
HOME MAIL USER USERNAME
daemon
/usr/sbin
/
$1
$2
daemon
$SBINDIR
/
$1
$2
RETVAL
=
$?
echo
touch
/var/lock/subsys/slurm
...
...
@@ -52,7 +60,7 @@ stop() {
}
startall
()
{
for
prog
in
`
scontrol show daemons
`
;
do
for
prog
in
`
$BINDIR
/
scontrol show daemons
`
;
do
optvar
=
`
echo
${
prog
}
_OPTIONS |
tr
"a-z"
"A-Z"
`
start
$prog
${
!optvar
}
done
...
...
@@ -68,7 +76,7 @@ slurmstatus() {
local
rpid
local
pidfile
pidfile
=
`
grep
-i
${
base
}
pid
/etc/slurm
/slurm.conf |
grep
-v
'^ *#'
`
pidfile
=
`
grep
-i
${
base
}
pid
$CONFDIR
/slurm.conf |
grep
-v
'^ *#'
`
if
[
$?
=
0
]
;
then
pidfile
=
${
pidfile
##*=
}
pidfile
=
${
pidfile
%#*
}
...
...
@@ -123,12 +131,12 @@ case "$1" in
startall
;;
stop
)
for
prog
in
`
scontrol show daemons
`
;
do
for
prog
in
`
$BINDIR
/
scontrol show daemons
`
;
do
stop
$prog
done
;;
status
)
for
prog
in
`
scontrol show daemons
`
;
do
for
prog
in
`
$BINDIR
/
scontrol show daemons
`
;
do
slurmstatus
$prog
done
;;
...
...
@@ -137,19 +145,19 @@ case "$1" in
;;
condrestart
)
if
[
-f
/var/lock/subsys/slurm
]
;
then
for
prog
in
`
scontrol show daemons
`
;
do
for
prog
in
`
$BINDIR
/
scontrol show daemons
`
;
do
stop
$prog
start
$prog
done
fi
;;
reconfig
)
for
prog
in
`
scontrol show daemons
`
;
do
for
prog
in
`
$BINDIR
/
scontrol show daemons
`
;
do
killproc
$prog
-HUP
done
;;
test
)
for
prog
in
`
scontrol show daemons
`
;
do
for
prog
in
`
$BINDIR
/
scontrol show daemons
`
;
do
echo
"
$prog
runs here"
done
;;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment