From owner-freebsd-questions@FreeBSD.ORG Thu Mar 8 17:55:51 2007 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8269016A401 for ; Thu, 8 Mar 2007 17:55:51 +0000 (UTC) (envelope-from drewjenkinsjr@yahoo.com) Received: from web62207.mail.re1.yahoo.com (web62207.mail.re1.yahoo.com [69.147.75.6]) by mx1.freebsd.org (Postfix) with SMTP id 2432013C4B2 for ; Thu, 8 Mar 2007 17:55:50 +0000 (UTC) (envelope-from drewjenkinsjr@yahoo.com) Received: (qmail 65245 invoked by uid 60001); 8 Mar 2007 17:55:50 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type:Message-ID; b=0GK0J72zrBiT1opQt9QnMQTBX3RbX3CiPdK7Ald/REA+cVN9i+CoWRXXbEOy87KFx/HfUSBkLmrUKqbZxKh5zbhsgtWBq02zcWTluoR46hx+v/XJ3XtLJQlmZO2Ym5wTTtQ/3Ao94sT8ys4vC7PVMjhkgJTJRoyxz8pTdcVyRac=; X-YMail-OSG: bfk5zRcVM1kyvQiRJ.hpBzmwbA9h8iyeSlSSPbOJHe6WKyewCgUVY3QzqUuFdLHmU3Hl0ywjGhR064SqxIqkB.fV4QV7.r4IOmWiWDsmmdI4XSwhza0NfovW267QjdQJ4Fdb Received: from [66.82.9.43] by web62207.mail.re1.yahoo.com via HTTP; Thu, 08 Mar 2007 09:55:50 PST X-Mailer: YahooMailRC/468 YahooMailWebService/0.6.132.8 Date: Thu, 8 Mar 2007 09:55:50 -0800 (PST) From: Drew Jenkins To: freebsd-questions@freebsd.org MIME-Version: 1.0 Message-ID: <390266.64333.qm@web62207.mail.re1.yahoo.com> Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Re: Setting Env 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, 08 Mar 2007 17:55:51 -0000 On Thu, Mar 08, 2007 at 08:31:23AM -0800, Drew Jenkins wrote:=0A=0A> Anyway= , I suggest first just working on getting any script to run=0A> at boot tim= e - or rather at the time the system comes up for multi-=0A> user, but that= stuff does not run when it comes up to single-user.=0A> =0A> So, my next s= uggestion is to make any little ole script with a couple=0A> of echo-s in i= t to demonstration that it runs and put that it=0A> the /usr/local/etc/rc.d= directory with the correct permissions=0A> and name, etc. NOTE, someone = in an earlier post clarified the .sh=0A> issue with information that was ne= w to me about the system looking=0A> for certain flags inside the file if t= he file name does not have=0A> the .sh ending. Go back and check that out= , but the this, assume=0A> you have to have .sh and execute permission.=0A>= =0A> You do not have to have a start/stop/restart check in the script if= =0A> the script will always just run regardless of parameter. But,=0A> wh= at the system does is call the script with a parameter of 'start'=0A> at bo= ot time and a parameter of 'stop' at shutdown time.=0A> =0A> But for the sa= ke of the primative test, those can be omitted.=0A> =0A> Let's say you call= the scriptfile: 'rctest.sh'=0A> Put something like:=0A> =0A> #!/bin/sh=0A>= echo "running rctest.sh, got this far"=0A> =0A> # Add any any other stuff = you want to test=0A> =0A> echo "running rctest.sh, finished"=0A> =0A> =0A> = Now, if the bare skeleton works, then start adding more parts=0A> to it unt= il you get to where everything works. Add more echo-s=0A> if they are use= ful.=0A=0ABut I've done that (except name it *.sh, which I just did). And I= 'm not at the server. It's on the other side of the globe. So I can't watch= echo's pop up as it boots. Here's my script:=0A=0A#!/bin/sh=0A=0Asleep 60= =0Aif [ -n "$LD_LIBRARY_PATH" ] ; then=0A export LD_LIBRARY_PATH=3D"${LD= _LIBRARY_PATH}:/usr/local/lib/mysql"=0Aelse=0A export LD_LIBRARY_PATH=3D= "/usr/local/lib/mysql"=0Afi=0A=0Acd /usr/local/zope/=0A./instance1/bin/zope= ctl stop=0A./instance1/bin/zopectl start=0A./instance2/bin/zopectl stop=0A.= /instance2/bin/zopectl start=0A=0AThe sleep is in there to try to get it to= run after everything else has come up, but it doesn't help. If I run that = script after boot, everything works out fine.=0A=0A> You could also look up= how to get your messages written to a log=0A=0AHey, now there's an idea! H= ow do I do that? Or where do I go to study how to do that?=0ATIA,=0ADrew=0A= =0A=0A=0A=0A=0A =0A________________________________________________________= ____________________________=0ABored stiff? Loosen up... =0ADownload and pl= ay hundreds of games for free on Yahoo! Games.=0Ahttp://games.yahoo.com/gam= es/front