usleep's pvrxxx port and /boot/loader.conf - panic
Bernhard Froehlich
decke at bluelife.at
Mon Jan 25 19:41:47 UTC 2010
On Mon, 25 Jan 2010 20:24:25 +0100, Torfinn Ingolfsen
<torfinn.ingolfsen at broadpark.no> wrote:
> On Sat, 02 Jan 2010 15:38:11 +0800
> Henry Hu <henry.hu.sh at gmail.com> wrote:
>
>> You may try /etc/rc.local
>
> Thanks for the hit. With a little help from another person who semt me
> his cron script (via private mail), I have cooked up this little script,
> to be put in /usr/local/etc/rc.d and cxmload_enable="YES" to be set
> in /etc/rc.conf. Works for me.
>
> The script:
> #!/bin/sh
> #
> #
> # PROVIDE: cxmload
> # REQUIRE: DAEMON
> # BEFORE: LOGIN
> # KEYWORD: shutdown
>
> #
>
> . /etc/rc.subr
>
> name="cxmload"
> rcvar=${name}_enable
>
> : ${cxmload_enable:="NO"}
>
> start_cmd=${name}_start
> stop_cmd=${name}_stop
>
> cxmload_start() {
> if ! /sbin/kldstat | grep -w cxm.ko >/dev/null; then
> echo "Loading the cxm kmod."
> /sbin/kldload cxm.ko
> else
> echo "The cxm kmod is already loaded."
> fi
> }
>
> cxmload_stop() {
> echo "Dummy - we don't unload the cxm kmod."
> }
>
> load_rc_config ${name}
> run_rc_command "$1"
>
> All I need now is to make sure that this script runs before the
> mythbackend script.
All you need to do is to change REQUIRE and BEFORE so that it gets called
before the daemons start. Have a look at some ports that load kernel
modules - for example virtualbox-ose-kmod which uses:
# PROVIDE: vboxnet
# REQUIRE: FILESYSTEMS
# BEFORE: netif
# KEYWORD: nojail
http://www.freebsd.org/cgi/cvsweb.cgi/ports/emulators/virtualbox-ose-kmod/files/vboxnet.in?rev=1.1;content-type=text%2Fplain
--
Bernhard Fröhlich
http://www.bluelife.at/
More information about the freebsd-multimedia
mailing list