Репозитории ALT
Группа :: Система/Настройка/Оборудование
Пакет: mdmpd
Главная Изменения Спек Патчи Исходники Загрузить Gear Bugs and FR Repocop
#!/bin/bash
#
# mdmpd Daemon to monitor MD multipath devices
#
# chkconfig: 2345 15 85
# description: Daemon to monitor MD multipath devices
# processname: mdmpd
# pidfile: /var/run/mdmpd.pid
#
# Copyright 2002 Red Hat, Inc.
# Changed 2005 for ALTLinux
PATH=/sbin:/usr/sbin:/bin:/usr/bin
RETVAL=0
prog=mdmpd
PIDFILE=/var/run/$prog.pid
LOCKFILE=/var/lock/subsys/$prog
EXPECTUSER=root
# Source function library.
WITHOUT_RC_COMPAT=1
. /etc/rc.d/init.d/functions
do_call() {
local fn=$1
shift
$fn --pidfile "$PIDFILE" --lockfile "$LOCKFILE" --expect-user "$EXPECTUSER" -- $prog "$@"
RETVAL=$?
return $RETVAL
}
case "$1" in
start) do_call start_daemon ;;
stop) do_call stop_daemon ;;
status) do_call status ;;
restart|reload) $0 stop; $0 start ;;
condrestart|condreload) [ -e "$LOCKFILE" ] && $0 restart ;;
*) msg_usage "${0##*/} {start|stop|status|restart|condrestart}"
RETVAL=1
;;
esac
exit $RETVAL
## EOF ##