FreeBSD Port: mgeupsd-0.3_1
Doug Barton
dougb at FreeBSD.org
Sun Jul 13 04:43:59 UTC 2008
In general, the comments below apply to all 3 scripts you submitted.
This is not meant to discourage your enthusiasm, but hopefully to
channel it into a more useful direction.
Before you proceed, please read
http://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/rc-scripts.html
and the rc.d Handbook chapter referenced in the first paragraph of
that article.
yves.guerin at muhc.mcgill.ca wrote:
> Hello,
>
> I redo the rc.d script file.
>
> #!/bin/sh
>
> # PatrioteBSD
> #########################################
> # JAMAIS TESTE AVEC mgeupsd_enable="yes"
> # NEVER TESTED WITH mgeupsd_enable="YES"
> #########################################
Someone else already mentioned that comments, instructions, etc.
should at least be in English. Of course, if you also want to provide
French translations of the comments that's fine too.
> # REQUIRE:
> # BEFORE: securelevel
Empty REQUIRE should not be used, and BEFORE should only be used as a
last resort. You could almost certainly achieve your desired goal with
"REQUIRE: LOGIN" which is what we recommend port authors use unless
they have a very good reason not to.
> mgeupsd_enable=${mgeupsd_enable:-"NO"}
Please see the article above regarding location of this line in the
script, and also style issues.
> mgeupsd_start()
> {
> #/usr/local/sbin/mgeupsd -run /usr/local/sbin/powerhandler
> /dev/cuaa0
> echo -n ' jamais teste - never tested - veuillez editer ce fichier
> $0 - edit this file $0 => mgeupsd'
> sleep 2
> }
None of this makes any sense to me, I have no idea what you're trying
to achieve.
> mgeupsd_stop()
> {
> kill `cat /var/run/mgeupsd.pid`
> rm -f /var/run/mgeupsd.pid
These two things are better handled by rc.subr.
> rm -f /var/run/powerstatus
I can't think of why this would be necessary, but if it is then this
should be a stop_postcmd.
> echo -n ' mgeupsd'
Don't do this. :)
hope this helps,
Doug
--
This .signature sanitized for your protection
More information about the freebsd-ports
mailing list