/[smeserver]/rpms/mdadm/sme7/mdmpd.init
ViewVC logotype

Diff of /rpms/mdadm/sme7/mdmpd.init

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

Revision 1.1 by slords, Tue Jun 12 16:34:41 2007 UTC Revision 1.2 by slords, Sat Dec 1 02:32:57 2007 UTC
# Line 6  Line 6 
6  # chkconfig: - 15 85  # chkconfig: - 15 85
7  # description: multipath device monitoring and management  # description: multipath device monitoring and management
8  #  #
   
9  # Copyright 2002 Red Hat, Inc.  # Copyright 2002 Red Hat, Inc.
10    #
11    ### BEGIN INIT INFO
12    # Default-Start:
13    # Default-Stop: 0 1 2 3 4 5 6
14    # Short-Description: Start and stop the MD multipath monitor
15    # Description: The mdmpd service checks the status of all MD based multipath
16    #       devices on the system.  If a path to a device goes down, it removes
17    #       that path from the md multipath array.  It also periodically attempts
18    #       to contact the device via the down path.  When it succeeds repeatedly,
19    #       it re-adds the downed path to the multipath array.  There is a roughly
20    #       60 second delay between when a path becomes live again and when mdmpd
21    #       adds it back into service.
22    ### END INIT INFO
23    
24    
25  PATH=/sbin:/usr/sbin:$PATH  PATH=/sbin:/usr/sbin:$PATH
26  RETVAL=0  RETVAL=0
# Line 32  usage () Line 45  usage ()
45    
46  start ()  start ()
47  {  {
48        [ `id -u` -eq 0 ] || return 4
49        [ -x /sbin/mdmpd ] || return 1
50        [ -f /var/lock/subsys/$prog ] && return 0
51      ulimit -S -c 0 >/dev/null 2>&1      ulimit -S -c 0 >/dev/null 2>&1
52      # clean up in case we went down unexpectedly      # clean up in case we went down unexpectedly
53      rm -f /var/run/$prog/*      rm -f /var/run/$prog/*
# Line 41  start () Line 57  start ()
57      usleep 100000      usleep 100000
58      pid=`pidof -o $$ -o $PPID -o %PPID -x $prog`      pid=`pidof -o $$ -o $PPID -o %PPID -x $prog`
59      if [ -n "$pid" ] ; then      if [ -n "$pid" ] ; then
60          success $"mdmpd"          echo_success
61          touch /var/lock/subsys/$prog          touch /var/lock/subsys/$prog
62          echo "$pid" > /var/run/$prog.pid          echo "$pid" > /var/run/$prog.pid
63          RETVAL=0          RETVAL=0
64      else      else
65          failure $"mdmpd"          echo_failure
66          RETVAL=1          RETVAL=1
67      fi      fi
68      echo      echo
# Line 54  start () Line 70  start ()
70    
71  stop ()  stop ()
72  {  {
73        [ `id -u` -eq 0 ] || return 4
74        [ ! -f /var/lock/subsys/$prog ] && return 0
75      echo -n $"Stopping $prog: "      echo -n $"Stopping $prog: "
76      killproc $prog      killproc $prog
77      echo      echo
# Line 69  restart () Line 87  restart ()
87    
88  condrestart ()  condrestart ()
89  {  {
90      [ -e /var/lock/subsys/$prog ] && restart      [ -e /var/lock/subsys/$prog ] && restart || return 0
91  }  }
92    
93    
94  case "$1" in  case "$1" in
95      start) start ;;      start) start; RETVAL=$? ;;
96      stop) stop ;;      stop) stop; RETVAL=$? ;;
97      status) status $prog ;;      status) status $prog; RETVAL=$? ;;
98      restart|reload) restart ;;      restart|force-reload) restart; RETVAL=$? ;;
99      condrestart) condrestart ;;      condrestart|try-restart|reload) condrestart; RETVAL=$? ;;
100      *) usage ;;      *) usage; RETVAL=2 ;;
101  esac  esac
102    
103  exit $RETVAL  exit $RETVAL


Legend:
Removed lines/characters  
Changed lines/characters
  Added lines/characters

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed