From owner-freebsd-questions@FreeBSD.ORG Thu Dec 15 21:56:24 2005 Return-Path: X-Original-To: questions@freebsd.org Delivered-To: freebsd-questions@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BBAB716A41F for ; Thu, 15 Dec 2005 21:56:24 +0000 (GMT) (envelope-from rsmith@xs4all.nl) Received: from smtp-vbr16.xs4all.nl (smtp-vbr16.xs4all.nl [194.109.24.36]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9B49643D53 for ; Thu, 15 Dec 2005 21:56:23 +0000 (GMT) (envelope-from rsmith@xs4all.nl) Received: from slackbox.xs4all.nl (slackbox.xs4all.nl [213.84.242.160]) by smtp-vbr16.xs4all.nl (8.13.3/8.13.3) with ESMTP id jBFLuL1Y066488; Thu, 15 Dec 2005 22:56:22 +0100 (CET) (envelope-from rsmith@xs4all.nl) Received: by slackbox.xs4all.nl (Postfix, from userid 1001) id 82910B829; Thu, 15 Dec 2005 22:56:21 +0100 (CET) Date: Thu, 15 Dec 2005 22:56:21 +0100 From: Roland Smith To: TuxGirl Message-ID: <20051215215621.GB11628@slackbox.xs4all.nl> References: <6e4453640512151313w5d44a059yf0aa15f45c6f9ff9@mail.gmail.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="EuxKj2iCbKjpUGkD" Content-Disposition: inline In-Reply-To: <6e4453640512151313w5d44a059yf0aa15f45c6f9ff9@mail.gmail.com> User-Agent: Mutt/1.4.2.1i X-GPG-Fingerprint: 1A2B 477F 9970 BA3C 2914 B7CE 1277 EFB0 C321 A725 X-GPG-Key: http://www.xs4all.nl/~rsmith/pubkey.txt X-GPG-Notice: If this message is not signed, don't assume I sent it! X-Virus-Scanned: by XS4ALL Virus Scanner Cc: questions@freebsd.org Subject: Re: run commands on boot/loading modules X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Dec 2005 21:56:24 -0000 --EuxKj2iCbKjpUGkD Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Dec 15, 2005 at 02:13:01PM -0700, TuxGirl wrote: > Hi, >=20 > There are 3 commands I was having to run each time that I started up > my computer, and I'm trying to figure out the correct way to have them > run automatically. >=20 > kldload if_iwi > iwicontrol -i iwi- -d /usr/local/share/iwi-firmware -m bss > kldload snd_ich To load the modules, put the following in /boot/loader.conf if_iwi_load=3D"YES" snd_ich_load=3D"YES" > So, I'm guessing that /etc/rc.conf isn't the right place to add these > 3 lines. =20 Yes. :-) Every rc script sources rc.conf, so your commands are all executed dozens of times. rc.conf is only for setting variables. > I just want the commands to run once during the boot, and > probably sometime near the end of boot so that I don't have to worry > about them depending on something that's done earlier on (at least for > the wireless stuff). If you have a single iwi device, it will be named iwi0, I think. =46rom looking at /etc/rc.d/netif, you'll see that it executes a shell function ifscript_up for every interface. You can find ifscript_up in /etc/network.subr. Looking at it, you can see that you should create a script /etc/start_if.iwi0, with the iwicontrol command in it. HTH, Roland --=20 R.F.Smith (http://www.xs4all.nl/~rsmith/) Please send e-mail as plain text. public key: http://www.xs4all.nl/~rsmith/pubkey.txt --EuxKj2iCbKjpUGkD Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (FreeBSD) iD8DBQFDoeaFEnfvsMMhpyURAm0BAKCQ6qWGEhX1R8FGvpZ5ENVwhL4SHACgkBDZ A919uCV1YaLgqd+3HPi9i9c= =aDGc -----END PGP SIGNATURE----- --EuxKj2iCbKjpUGkD--