Sophie

Sophie

distrib > Mandriva > 2009.1 > x86_64 > by-pkgid > 76a7c5dbc9fa76ad911f8284714b5cef > files > 1

cpqarrayd-2.3-4mdv2009.1.x86_64.rpm

#! /bin/sh
#
# cpqarrayd    Start/Stop Compaq Array monitor
#
# chkconfig: 345 15 90
# description: The cpqarrayd monitors the status of Compaq Raid Arrays, \
#              and reports via syslog or traps
# processname: cpqarrayd

# Source function library.
. /etc/rc.d/init.d/functions

# Get config.
if [ -f /etc/sysconfig/cpqarrayd ]; then
        . /etc/sysconfig/cpqarrayd
fi

[ -f /usr/sbin/cpqarrayd ] || exit 0

RETVAL=0

# See how we were called.
case "$1" in
  start)
        gprintf "Starting cpqarrayd: "
        daemon /usr/sbin/cpqarrayd $CPQ_PARAMS
        RETVAL=$?
        echo
        [ $RETVAL -eq 0 ] && touch /var/lock/subsys/cpqarrayd
        ;;
  stop)
        gprintf "Stopping cpqarrayd: "
        killproc cpqarrayd
        RETVAL=$?
        echo
        [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/cpqarrayd
        ;;
  status)
        status cpqarrayd
        RETVAL=$?
        ;;
  restart|reload)
        $0 stop
        $0 start
        RETVAL=$?
        ;;
  *)
        gprintf "Usage: cpqarrayd {start|stop|status|restart|reload}\n"
        exit 1
esac

exit $RETVAL