From owner-freebsd-multimedia@FreeBSD.ORG Mon Jan 25 19:41:47 2010 Return-Path: Delivered-To: freebsd-multimedia@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7B36D1065693 for ; Mon, 25 Jan 2010 19:41:47 +0000 (UTC) (envelope-from decke@bluelife.at) Received: from mail.itac.at (mail.itac.at [91.205.172.9]) by mx1.freebsd.org (Postfix) with ESMTP id E54838FC19 for ; Mon, 25 Jan 2010 19:41:46 +0000 (UTC) Received: from [91.205.172.21] (helo=webmail.bluelife.at) by mail.itac.at with esmtpsa (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.63) (envelope-from ) id 1NZUoi-0000yp-CR; Mon, 25 Jan 2010 20:41:44 +0100 MIME-Version: 1.0 Date: Mon, 25 Jan 2010 20:41:45 +0100 From: Bernhard Froehlich To: Torfinn Ingolfsen In-Reply-To: <20100125202425.18ad4fb2.torfinn.ingolfsen@broadpark.no> References: <20100102001753.090c89ad.torfinn.ingolfsen@broadpark.no> <53a1e0711001012338v4ba68961o4a1d26a40abce396@mail.gmail.com> <20100125202425.18ad4fb2.torfinn.ingolfsen@broadpark.no> Message-ID: X-Sender: decke@bluelife.at User-Agent: RoundCube Webmail/0.3.1 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 X-Spam-Score: 0.2 (/) X-Spam-Report: Spam detection software, running on the system "mail.itac.at", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: On Mon, 25 Jan 2010 20:24:25 +0100, Torfinn Ingolfsen wrote: > On Sat, 02 Jan 2010 15:38:11 +0800 > Henry Hu 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. [...] Content analysis details: (0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.4 ALL_TRUSTED Passed through trusted hosts only via SMTP 3.4 FH_DATE_PAST_20XX The date is grossly in the future. -1.7 AWL AWL: From: address is in the auto white-list Cc: freebsd-multimedia@FreeBSD.org Subject: Re: usleep's pvrxxx port and /boot/loader.conf - panic X-BeenThere: freebsd-multimedia@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Multimedia discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jan 2010 19:41:47 -0000 On Mon, 25 Jan 2010 20:24:25 +0100, Torfinn Ingolfsen wrote: > On Sat, 02 Jan 2010 15:38:11 +0800 > Henry Hu 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/