Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
machinejobfeatures
mjf-scripts
Commits
339aeee5
Commit
339aeee5
authored
Feb 28, 2016
by
Andrew McNab
Browse files
Use generic name mjf-scripts
parent
87b69242
Changes
4
Hide whitespace changes
Inline
Side-by-side
Makefile
View file @
339aeee5
...
...
@@ -31,15 +31,15 @@
include
VERSION
INSTALL_FILES
=
VERSION prologue.user epilogue.user mjf
-torque
.init mjf.sh mjf.csh
INSTALL_FILES
=
VERSION prologue.user epilogue.user mjf.init mjf.sh mjf.csh
TGZ_FILES
=
$(INSTALL_FILES)
Makefile mjf-
torque
.spec
TGZ_FILES
=
$(INSTALL_FILES)
Makefile mjf-
scripts
.spec
GNUTAR
?=
tar
mjf-
torque
.tgz
:
$(TGZ_FILES)
mkdir
-p
TEMPDIR/mjf-
torque
cp
$(TGZ_FILES)
TEMPDIR/mjf-
torque
cd
TEMPDIR
;
$(GNUTAR)
zcvf ../mjf-
torque
.tgz
--owner
=
root
--group
=
root mjf-
torque
mjf-
scripts
.tgz
:
$(TGZ_FILES)
mkdir
-p
TEMPDIR/mjf-
scripts
cp
$(TGZ_FILES)
TEMPDIR/mjf-
scripts
cd
TEMPDIR
;
$(GNUTAR)
zcvf ../mjf-
scripts
.tgz
--owner
=
root
--group
=
root mjf-
scripts
rm
-R
TEMPDIR
install
:
$(INSTALL_FILES)
...
...
@@ -48,16 +48,16 @@ install: $(INSTALL_FILES)
$(RPM_BUILD_ROOT)
/etc/profile.d
cp
prologue.user epilogue.user
\
$(RPM_BUILD_ROOT)
/var/lib/torque/mom_priv
cp
mjf
-torque
.init
\
$(RPM_BUILD_ROOT)
/etc/rc.d/init.d/mjf
-torque
cp
mjf.init
\
$(RPM_BUILD_ROOT)
/etc/rc.d/init.d/mjf
cp
mjf.sh mjf.csh
\
$(RPM_BUILD_ROOT)
/etc/profile.d
rpm
:
mjf-
torque
.tgz
rpm
:
mjf-
scripts
.tgz
rm
-Rf
RPMTMP
mkdir
-p
RPMTMP/SOURCES RPMTMP/SPECS RPMTMP/BUILD
\
RPMTMP/SRPMS RPMTMP/RPMS/noarch RPMTMP/BUILDROOT
cp
-f
mjf-
torque
.tgz RPMTMP/SOURCES
cp
-f
mjf-
scripts
.tgz RPMTMP/SOURCES
export
MJF_VERSION
=
$(VERSION)
;
rpmbuild
-ba
\
--define
"_topdir
$(
shell
pwd
)
/RPMTMP"
\
--buildroot
$(
shell
pwd
)
/RPMTMP/BUILDROOT mjf-
torque
.spec
--buildroot
$(
shell
pwd
)
/RPMTMP/BUILDROOT mjf-
scripts
.spec
mjf-
torque
.spec
→
mjf-
scripts
.spec
View file @
339aeee5
File moved
mjf
-torque
.init
→
mjf.init
View file @
339aeee5
#!/bin/bash
#
# mjf
-torque
Create /etc/machinefeatures files
# mjf Create /etc/machinefeatures files
#
# chkconfig: 345 90 10
# description: Create /etc/machinefeatures files following the Machine/Job Features specification in HSF-TN-2016-02
...
...
@@ -18,14 +18,14 @@
#
# Persistent configuration goes in sysconfig
if
[
-f
/etc/sysconfig/mjf
-torque
]
;
then
.
/etc/sysconfig/mjf
-torque
if
[
-f
/etc/sysconfig/mjf
]
;
then
.
/etc/sysconfig/mjf
fi
# Transient configuration goes in run - for example shutdowntime
# Files put in mjf get deleted when the machine boots up
if
[
-f
/var/run/mjf
-torque
]
;
then
.
/var/run/mjf
-torque
if
[
-f
/var/run/mjf
]
;
then
.
/var/run/mjf
fi
start
()
{
...
...
prologue.user
View file @
339aeee5
...
...
@@ -124,15 +124,15 @@ else:
# Is this the right name??
jobfeatures
[
'max_rss_bytes'
]
=
rssInt
# Values in /var/run/mjf
-torque
take precedence
# Values in /var/run/mjf take precedence
try
:
fromRun
=
open
(
'/var/run/mjf
-torque
'
,
'r'
).
read
()
fromRun
=
open
(
'/var/run/mjf'
,
'r'
).
read
()
except
:
fromRun
=
''
# Also look in persistent /etc/sysconfig/mjf
-torque
# Also look in persistent /etc/sysconfig/mjf
try
:
fromSysconfig
=
open
(
'/etc/sysconfig/mjf
-torque
'
,
'r'
).
read
()
fromSysconfig
=
open
(
'/etc/sysconfig/mjf'
,
'r'
).
read
()
except
:
fromSysconfig
=
''
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment