Hello,
clvmd, as well as and some other daemons, does accept command arguments and 
this feature could be implemented at the init script.
This file below has ARGUMENTS configuration, and this could be setup at the 
/etc/default/clvmd system wide configuration file.
Regards.
Andre Felipe Machado


#! /bin/sh

# clvmd         Start/Stop script for the cluster LVM daemon
# Author:       Daniel Bertolo [EMAIL PROTECTED]
# Version:      @(#)clvmd  1.00  25-Jun-2006  [EMAIL PROTECTED]
# Version:      @(#)clvmd  1.01  22-May-2007  andremachado % techforce.com.br
# Version:      @(#)clvmd  2.00  04-Jun-2007  andremachado % techforce.com.br
# Version:      @(#)clvmd  2.01  08-Jun-2007  andremachado % techforce.com.br

# Script compliant with Debian Policy 9.3
set -e

PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
DESC="The cluster LVM daemon"
NAME=clvmd
DAEMON=/sbin/$NAME
PIDFILE=/var/run/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME
ARGUMENTS=""

if [ -f /etc/default/$NAME ]; then
        . /etc/default/$NAME
fi

test -x $DAEMON || exit 0

d_start() {
        start-stop-daemon --start --exec $DAEMON -- $ARGUMENTS
}

d_stop() {
        start-stop-daemon --stop $1 $2 $3 $4 --exec $DAEMON -- $ARGUMENTS
}

case "$1" in
  start)
        echo -n "Starting $DESC: $NAME "
        d_start || exit 1
        echo "."
        ;;
  stop)
        echo -n "Stopping $DESC: $NAME "
        d_stop || exit 1
        echo "."
        ;;
  restart)
        echo  -n "Restarting $DESC: $NAME "
        d_stop --oknodo  --quiet --retry 10 || sleep 5
        d_start || sleep 5
        echo "."
        ;;
  reload|force-reload)
        echo  -n "Reloading $DESC: $NAME "
        d_stop --oknodo  --quiet --retry 10 --signal HUP || sleep 5
        d_start || sleep 5
        echo "."
        ;;
  *)
        echo "Usage: invoke-rc.d $NAME 
{start|stop|restart|reload|force-reload}" >&2
        exit 1
        ;;
esac
exit 0



Reply via email to