On Fri, 2003-06-06 at 16:18, Norman Zhang wrote:
> Hi,
>
> I have vendor program at /opt/CA/uagent/uagent with symlink from
> /usr/lib/uagent.
>
> I would like to run this program after boot. So I created
> /etc/rc.d/init.d/uagent. When I tried chkconfig --add uagent. I get "Service
> uagent does not support chkconfig". Would someone please give me a few
> pointers.
>
> #!/bin/sh
> #
> # usagent Start CA BrightStor Linux Backup Agent.
> # This script starts /usr/bin/uagent
> #
> # chkconfig: 2345 90 20
# description put your products description here \
# using the backslash to do multi line ones.
> #
>
> . /etc/rc.d/init.d/functions
>
> RETVAL = 0
>
> case "$1" in
> start)
> action "Starting uagent" /usr/bin/uagent start
> return $RETVAL
> ;;
> stop)
> action "Stopping Uagent" /usr/bin/uagent stop
> return $RETVAL
> ;;
> status)
> action "Show Status of uagent" /usr/bin/uagent status
> return $RETVAL
> ;;
> *)
> gprintf "Usage: %s { status | start | stop }\n" "$0"
> exit 1
> ;;
> esac
> exit 0
As you can see above I added the description. Don't know why but if you
skip this one it won't work under chkconfig. I ran into exactly the
same problem myself when doing one for my old company. Second question
would be do you really nee this to work at runlevels 2 and 4.
Escpecially 4 since that one isn't used.
James
Want to buy your Pack or Services from MandrakeSoft?
Go to http://www.mandrakestore.com