Date: Thu, 15 Dec 2005 22:56:21 +0100 From: Roland Smith <rsmith@xs4all.nl> To: TuxGirl <tuxgirl@gmail.com> Cc: questions@freebsd.org Subject: Re: run commands on boot/loading modules Message-ID: <20051215215621.GB11628@slackbox.xs4all.nl> In-Reply-To: <6e4453640512151313w5d44a059yf0aa15f45c6f9ff9@mail.gmail.com> References: <6e4453640512151313w5d44a059yf0aa15f45c6f9ff9@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--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--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20051215215621.GB11628>