[osiris-devel] freebsd rc scripts
Brian Wotring
brian at shmoo.com
Wed Feb 9 22:12:17 EST 2005
Apologies for the slow response.
The rc.conf additions are leftover from when the installer was initially
developed, they do not need to be in there. The rc scripts were done
this way for compatibility reasons. Is there a specific reason that you
would like to migrate to RCng? Otherwise, I don't see any reasons to.
As for -TERM, you're right. The osirisd daemon does seem to demonstrate
this behavior on FreeBSD. It does not do this on Mac OS X or Linux.
More than likely, it is related to signal initialization; I'll take a
look unless someone beats me to it. Thanks for pointing this out.
-brian
David Thiel wrote:
> In the install under freebsd, I notice that osiris tells the user to
> add osirisd_enable="YES" and/or osirismd_enable="YES" to /etc/rc.conf.
> However, the osiris startup scripts don't use those variables, as
> they're old-style rc scripts instead of rcng scripts. I've gone ahead
> and converted them to rcng style, which allows them to be controlled
> in this way.
>
> 4.x users would need to install sysutils/rc_subr for these scripts to
> work. This is usually already installed these days because of other
> ports using rcng scripts. I'd like these considered for replacing the
> current rc scripts included with osiris.
>
> Note that the script for osirisd has its own stop command instead of
> using the default rcng stop. This is because for some reason "kill -TERM
> $parentpid $childpid" doesn't actually kill the parent, but "killall
> -TERM osirisd" does. Can anyone tell me why this is?
>
> Cheers,
> David
>
>
>
> ------------------------------------------------------------------------
>
> #!/bin/sh
>
> # PROVIDE: osirisd
> # REQUIRE: DAEMON
> # BEFORE: securelevel
> # KEYWORD: FreeBSD
>
> #
> # To enable osirisd, add:
> #
> #osirisd_enable=YES
> #
> # to one of these files:
> # /etc/rc.conf
> # /etc/rc.conf.local
> # /etc/rc.conf.d/osirisd
> #
>
> osirisd_enable=${osirisd_enable:-"NO"}
> osirisd_flags=${osirisd_flags:-"-r @OSIRISDIR@"}
>
> . "/etc/rc.subr"
>
> name="osirisd"
> rcvar=`set_rcvar`
> command=@INSTALLDIR@/osirisd
> stop_cmd="osirisd_stop"
>
> osirisd_stop() {
> /usr/bin/killall ${name} > /dev/null 2>&1 && echo "Stopping ${name}."
> }
>
> load_rc_config $name
> run_rc_command "$1"
>
>
> ------------------------------------------------------------------------
>
> #!/bin/sh
>
> # PROVIDE: osirismd
> # REQUIRE: DAEMON
> # BEFORE: securelevel
> # KEYWORD: FreeBSD
>
> #
> # To enable osirismd, add:
> #
> #osirismd_enable=YES
> #
> # to one of these files:
> # /etc/rc.conf
> # /etc/rc.conf.local
> # /etc/rc.conf.d/osirismd
> #
>
> osirismd_enable=${osirismd_enable:-"NO"}
> osirismd_flags=${osirismd_flags:-"-r @OSIRISDIR@"}
>
> . "/etc/rc.subr"
>
> name="osirismd"
> rcvar=`set_rcvar`
> command=@INSTALLDIR@/osirismd
>
> run_rc_command "$1"
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> osiris-devel mailing list
> osiris-devel at lists.shmoo.com
> https://lists.shmoo.com/mailman/listinfo/osiris-devel
More information about the osiris-devel
mailing list