From owner-freebsd-questions Sat Dec 23 16:51:49 2000 From owner-freebsd-questions@FreeBSD.ORG Sat Dec 23 16:51:45 2000 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from athserv.otenet.gr (athserv.otenet.gr [195.170.0.1]) by hub.freebsd.org (Postfix) with ESMTP id 9E3E337B400 for ; Sat, 23 Dec 2000 16:51:44 -0800 (PST) Received: from hades.hell.gr (patr530-b030.otenet.gr [195.167.121.158]) by athserv.otenet.gr (8.10.1/8.10.1) with ESMTP id eBO0pfh16361; Sun, 24 Dec 2000 02:51:42 +0200 (EET) Received: (from charon@localhost) by hades.hell.gr (8.11.1/8.11.1) id eBNFNZB74339; Sat, 23 Dec 2000 17:23:35 +0200 (EET) Date: Sat, 23 Dec 2000 17:23:35 +0200 From: Giorgos Keramidas To: Moses Backman III Cc: Drew Tomlinson , FreeBSD Questions Subject: Re: How to Get Program to Start Automatically Upon Boot Message-ID: <20001223172334.A48060@hades.hell.gr> References: <20001217202040.C674@cg22413-a.adubn1.nj.home.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.4i In-Reply-To: <20001217202040.C674@cg22413-a.adubn1.nj.home.com>; from penguinjedi@home.com on Sun, Dec 17, 2000 at 08:20:40PM +0000 X-PGP-Fingerprint: 3A 75 52 EB F1 58 56 0D - C5 B8 21 B6 1B 5E 4A C2 X-URL: http://students.ceid.upatras.gr/~keramida/index.html Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Sun, Dec 17, 2000 at 08:20:40PM +0000, Moses Backman III wrote: > > On 2000.12.18 01:17:02 +0000 Drew Tomlinson wrote: > > I have added a program to my system and would like it to start > > automatically upon boot. I'm sure it's as simple as adding the program > > name to some startup script but I don't know where that would be. So > > what file do I need to modify? > > > > Thanks for your help! > > add to /etc/rc before the exit 0 line You shouldn't modify /etc/rc in any way, other than updating it from the sources at /usr/src/etc when you installworld. The proper way of starting things is: a) To add the shell code that fires up the program at /etc/rc.local This will be run by /etc/rc automatically when everything else has finished. b) To add a SysV-style script in the /usr/local/etc/rc.d directory called `program.sh' and let the system scripts start it with `start' as the first command line option at boot time. - giorgos To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message