|
|
cb9bdf |
--- a/contrib/init.d/pbs_mom.in 2015-03-19 20:24:58.000000000 -0700
|
|
|
cb9bdf |
+++ b/contrib/init.d/pbs_mom.in 2016-02-20 18:46:26.058196405 -0800
|
|
|
cb9bdf |
@@ -13,11 +13,21 @@
|
|
|
cb9bdf |
SBIN_PATH=@sbindir@
|
|
|
cb9bdf |
PBS_DAEMON="$SBIN_PATH/pbs_mom"
|
|
|
cb9bdf |
PBS_HOME=@PBS_HOME@
|
|
|
cb9bdf |
+# this should be the integer port value
|
|
|
cb9bdf |
+PBS_PORT=""
|
|
|
cb9bdf |
|
|
|
cb9bdf |
if [ -f /etc/sysconfig/pbs_mom ];then
|
|
|
cb9bdf |
. /etc/sysconfig/pbs_mom
|
|
|
cb9bdf |
fi
|
|
|
cb9bdf |
|
|
|
cb9bdf |
+if [ -z "$PBS_PORT" ]; then
|
|
|
cb9bdf |
+ momctl_port_arg=""
|
|
|
cb9bdf |
+ pbs_mom_port_arg=""
|
|
|
cb9bdf |
+else
|
|
|
cb9bdf |
+ momctl_port_arg="$PBS_PORT"
|
|
|
cb9bdf |
+ pbs_mom_port_arg="-M $PBS_PORT"
|
|
|
cb9bdf |
+fi
|
|
|
cb9bdf |
+
|
|
|
cb9bdf |
if [ -z "$previous" ];then
|
|
|
cb9bdf |
# being run manually, don't disturb jobs
|
|
|
cb9bdf |
args="$args -p"
|
|
|
cb9bdf |
@@ -41,7 +51,7 @@
|
|
|
cb9bdf |
fi
|
|
|
cb9bdf |
retval=1
|
|
|
cb9bdf |
while kill -0 $pid 2>/dev/null;do
|
|
|
cb9bdf |
- $SBIN_PATH/momctl -s
|
|
|
cb9bdf |
+ $SBIN_PATH/momctl -s $momctl_port_arg
|
|
|
cb9bdf |
retval=$?
|
|
|
cb9bdf |
sleep 1
|
|
|
cb9bdf |
done
|
|
|
cb9bdf |
@@ -58,7 +68,7 @@
|
|
|
cb9bdf |
[ $RET -eq 0 ] && echo -n "pbs_mom already running" && success && echo && exit 0
|
|
|
cb9bdf |
|
|
|
cb9bdf |
# ulimit -c unlimited # Uncomment this to preserve core files
|
|
|
cb9bdf |
- daemon $PBS_DAEMON $args -d $PBS_HOME
|
|
|
cb9bdf |
+ daemon $PBS_DAEMON $args $pbs_mom_port_arg -d $PBS_HOME
|
|
|
cb9bdf |
RET=$?
|
|
|
cb9bdf |
touch /var/lock/subsys/pbs_mom
|
|
|
cb9bdf |
echo
|
|
|
cb9bdf |
--- a/contrib/init.d/pbs_sched.in 2016-02-20 18:48:08.593799420 -0800
|
|
|
cb9bdf |
+++ b/contrib/init.d/pbs_sched.in 2016-02-20 18:48:54.455727300 -0800
|
|
|
cb9bdf |
@@ -11,6 +11,7 @@
|
|
|
cb9bdf |
PBS_DAEMON=@sbindir@/pbs_sched
|
|
|
cb9bdf |
PBS_HOME=@PBS_HOME@
|
|
|
cb9bdf |
export PBS_DAEMON PBS_HOME
|
|
|
cb9bdf |
+PBS_ARGS=""
|
|
|
cb9bdf |
|
|
|
cb9bdf |
if [ -f /etc/sysconfig/pbs_sched ];then
|
|
|
cb9bdf |
. /etc/sysconfig/pbs_sched
|
|
|
cb9bdf |
@@ -24,7 +25,7 @@
|
|
|
cb9bdf |
RET=$?
|
|
|
cb9bdf |
[ $RET -eq 0 ] && echo -n "pbs_sched already running" && success && echo && exit 0
|
|
|
cb9bdf |
|
|
|
cb9bdf |
- daemon $PBS_DAEMON -d $PBS_HOME
|
|
|
cb9bdf |
+ daemon $PBS_DAEMON -d $PBS_HOME $PBS_ARGS
|
|
|
cb9bdf |
RET=$?
|
|
|
cb9bdf |
[ $RET -eq 0 ] && touch /var/lock/subsys/pbs_sched
|
|
|
cb9bdf |
echo
|