Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 30 Jan 2003 11:00:10 +0000
From:      Daniel Bye <dan@slightlystrange.org>
To:        freebsd-questions@FreeBSD.ORG
Subject:   Re: Modifying /etc/rc?
Message-ID:  <20030130110010.GB71169@catflap.home.slightlystrange.org>
In-Reply-To: <5.2.0.9.0.20030130143905.00a0aaa0@127.0.0.1>
References:  <5.2.0.9.0.20030130143905.00a0aaa0@127.0.0.1>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Jan 30, 2003 at 02:49:07PM +0700, Roger Merritt wrote:
> My earlier question about starting up vncserver has been answered with a 
> couple of possible methods, and in the course of looking at them I found 
> that during boot-up the PATH variable is set by the /etc/rc script.
> 
> Now, it seems to me that modifying the vncserver script is not elegant. I 
> don't think it's a good idea for me to make *any* modifications to 
> something that somebody else wrote, even when the code is as clear and easy 
> to understand as in this case. Besides, what if I upgrade and forget to 
> check if that file has changed? I could change the PATH variable to add 
> /usr/X11R6/bin in my rc.d script. This sounds like a better idea to me.
> 
> How about making a change to /etc/rc? Is this a Bad Idea (tm)? I'm sure 
> there's a reason /usr/X11R6/bin isn't in the path set in that script. So 
> far I haven't made an /etc/rc.local and I don't want to. The obvious 
> argument against modifying /etc/rc is that it will add another merging 
> operation to mergemaster whenever I upgrade. Is this kind of modification 
> suitable for putting in /etc/rc.conf?

Don't change /etc/rc.  If you break it, your machine won't work
properly.  Really, the best thing to do here is to set the path
explicitly in the control script that starts vncserver.  It will inherit
a path from rc, which you can add to for the duration of the shell
process spawned to start vncserver.  Making the changes only for those
bits of the startup that _need_ it is, IMHO, a more elegant approach
than being so general as to redefine the path for the whole startup.

/usr/X11R6/bin is not in the path by default as X11R6 is not part of
the base OS.  Generally, it gets appended to your path as you log in.
Check out man login.conf if you want to set it centrally for all logins.
 
HTH

Dan

-- 
Daniel Bye

PGP Key: ftp://ftp.slightlystrange.org/pgpkey/dan.asc
PGP Key fingerprint: 3D73 AF47 D448 C5CA 88B4 0DCF 849C 1C33 3C48 2CDC
                                                                     _
                                              ASCII ribbon campaign ( )
                                         - against HTML, vCards and  X
                                - proprietary attachments in e-mail / \

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030130110010.GB71169>