~ubuntu-branches/ubuntu/precise/torque/precise-updates

« back to all changes in this revision

Viewing changes to contrib/init.d/suse.pbs_mom

  • Committer: Bazaar Package Importer
  • Author(s): Morten Kjeldgaard
  • Date: 2009-02-16 17:32:28 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20090216173228-repbgujfj52115mg
Tags: 2.3.6+dfsg-0ubuntu1
* New upstream release (LP: #235385).
* Torque-server init script fails during installation and 
  removal (LP: #223649) fixed, "set -e" removed from init script.
* Package torque-scheduler 2.1.8+dfsg-0ubuntu1.1 failed to install
  (LP: #244440 LP: #270574) fixed, "set -e" removed from init script.
* /etc/init.d/torque-mom not idempotent, and stop doesn't work
  (LP: #256998) Fixed, "set -e" removed from init script.
* Torque-scheduler prints errors during package configuration
  (LP: #270653). Reason: missing dir sched_config. Fixed,
  package installs FIFO scheduler config file in
  /var/lib/torque/sched_priv/.
* Package torque-mom 2.1.8+dfsg-0ubuntu1 failed to 
  install/upgrade (LP: #276575 LP: #291674). Reason: missing directories.
  Fixed, /var/lib/torque/server_priv/jobs/, 
  /var/lib/torque/server_priv/queues/, 
  /var/lib/torque/server_priv/accounting/ and
  /var/lib/torque/mom_priv/jobs/ are now installed in their respective
  packages.
* Package torque-gui missing most of the files it needs to run!
  (LP: #281360). Reason: missing *.tk etc. files from src/gui
  Fixed: /usr/lib/xpbs now shipped in package
* changed patch system to quilt.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
#
3
3
# pbs_mom       This script will start and stop the PBS Mom
4
4
#
5
 
# chkconfig: 345 95 5
6
 
# description: TORQUE/PBS is a versatile batch system for SMPs and clusters
7
 
#
 
5
### BEGIN INIT INFO
 
6
# Provides:       pbs_mom
 
7
# Required-Start: $syslog $remote_fs
 
8
# Should-Start: pbs_server pbs_sched
 
9
# Required-Stop: $syslog $remote_fs
 
10
# Should-Stop: $null
 
11
# Default-Start:  2 3 5
 
12
# Default-Stop:
 
13
# Short-Description: Torque Node Manager Daemon
 
14
# Description: Torque is a versatile batch system for SMPs and clusters.
 
15
#       This starts the operation of a batch Machine Oriented Mini-server,
 
16
#       MOM, on the local host.
 
17
### END INIT INFO
 
18
 
8
19
PBS_DAEMON=/usr/sbin/pbs_mom
9
20
PBS_HOME=/var/torque
10
21
PIDFILE=$PBS_HOME/mom_priv/mom.lock
25
36
   args="-p"
26
37
fi
27
38
 
28
 
pidof_pbs_mom() {
29
 
   pid="-1"
30
 
   if [ -f $PIDFILE ];then
31
 
        pid=`cat $PIDFILE`
32
 
   fi
33
 
   echo $pid
34
 
}
35
 
 
36
 
kill_pbs_mom() {
37
 
   pid=`pidof_pbs_mom`
38
 
 
39
 
   if [ $pid -le 1 ];then
40
 
      return -1;
41
 
   fi
42
 
   retval=1
43
 
   while kill -0 $pid 2>/dev/null;do
44
 
      kill -TERM $pid
45
 
      retval=$?
46
 
      sleep 1
47
 
   done
48
 
   return $retval
49
 
}
50
 
        
 
39
 
51
40
# how were we called
52
41
case "$1" in
53
42
        start)
63
52
                ;;
64
53
        stop)
65
54
                echo -n "Shutting down TORQUE Mom: "
66
 
                kill_pbs_mom
 
55
                killproc -p $PIDFILE $PBS_DAEMON
67
56
                rc_status -v
68
57
                ;;
69
58
        status)
 
59
                echo -n "Checking TORQUE Mom: "
70
60
                checkproc -p $PIDFILE $PBS_DAEMON
71
61
                rc_status -v
72
62
                ;;
76
66
                $0 start
77
67
                rc_status
78
68
                ;;
79
 
        reload)
 
69
        try-restart)
 
70
                $0 status >/dev/null && $0 restart
 
71
                rc_status
 
72
                ;;
 
73
        reload|force-reload)
80
74
                echo -n "Re-reading TORQUE Mom config file: "
81
75
                killproc -p $PIDFILE -HUP pbs_mom
82
76
                rc_status -v
83
77
                ;;
84
78
        *)
85
 
                echo "Usage: pbs_mom {start|stop|restart|reload|status|purge}"
 
79
                echo "Usage: pbs_mom {start|stop|status|try-restart|restart|force-reload|reload|purge}"
86
80
                exit 1
87
81
esac
88
82
rc_exit
89