[osiris-devel] freebsd rc scripts
David Thiel
lx at redundancy.redundancy.org
Tue Feb 8 18:05:51 EST 2005
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
-------------- next part --------------
#!/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"
-------------- next part --------------
#!/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"
More information about the osiris-devel
mailing list