Blame SOURCES/torque-4.2.10-port-args.patch

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