Commit 90ff0c49 authored by Andrew McNab's avatar Andrew McNab
Browse files

Remove directory for upgrading

parent f897a5b6
......@@ -31,7 +31,7 @@
include VERSION
INSTALL_FILES=VERSION prologue.user epilogue.user mjf.init mjf.sh mjf.csh
INSTALL_FILES=VERSION prologue.user epilogue.user mjf-torque.init mjf.sh mjf.csh
TGZ_FILES=$(INSTALL_FILES) Makefile mjf-torque.spec
......@@ -48,8 +48,8 @@ install: $(INSTALL_FILES)
$(RPM_BUILD_ROOT)/etc/profile.d
cp prologue.user epilogue.user \
$(RPM_BUILD_ROOT)/var/lib/torque/mom_priv
cp mjf.init \
$(RPM_BUILD_ROOT)/etc/rc.d/init.d/mjf
cp mjf-torque.init \
$(RPM_BUILD_ROOT)/etc/rc.d/init.d/mjf-torque
cp mjf.sh mjf.csh \
$(RPM_BUILD_ROOT)/etc/profile.d
......
#!/bin/bash
#
# mjf Create /etc/machinefeatures files
# mjf-torque 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,11 +18,15 @@
#
# Persistent configuration goes in sysconfig
. /etc/sysconfig/mjf
if [ -f /etc/sysconfig/mjf-torque ] ; then
. /etc/sysconfig/mjf-torque
fi
# Transient configuration goes in run - for example shutdowntime
# Files put in mjf get deleted when the machine boots up
. /var/run/mjf
if [ -f /var/run/mjf-torque ] ; then
. /var/run/mjf-torque
fi
start() {
[ "$EUID" != "0" ] && exit 1
......@@ -56,6 +60,7 @@ start() {
echo -n "$grace_secs" > /etc/machinefeatures/grace_secs
fi
echo_success
echo
return 0
}
......@@ -63,8 +68,10 @@ start() {
stop() {
[ "$EUID" != "0" ] && exit 3
# We do not currently do anything for this!
echo -n $"Tidy up machinefeatures: "
# Remove /etc/machinefeatures in case upgrading
echo -n $"Clean up machinefeatures: "
rm -Rf /etc/machinefeatures
echo_success
echo
return 0
}
......
......@@ -22,9 +22,14 @@ MJF for Torque/PBS
make install
%post
chkconfig mjf on
service mjf start
chkconfig mjf-torque on
service mjf-torque start
%preun
chkconfig mjf-torque off
service mjf-torque stop
%files
/var/lib/torque/mom_priv
/etc/rc.d/init.d/*
/etc/profile.d/*
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment