Re: Modifying /etc/rc?
Chris Doherty <[EMAIL PROTECTED]> writes: > unless I'm wrong, /etc/rc.local exists specifically so you don't have to > modify /etc/rc. /etc/rc refers to rc.local as "traditional (but rather > obsolete)", but nowhere in my FreeBSD travels over the past four years > have I found any suggestion of what else you're supposed to use. For the answer to this question, see "man rc.local". To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-questions" in the body of the message
Re: Modifying /etc/rc?
On 2003-01-30 08:40, Chris Doherty <[EMAIL PROTECTED]> wrote: > unless I'm wrong, /etc/rc.local exists specifically so you don't > have to modify /etc/rc. /etc/rc refers to rc.local as "traditional > (but rather obsolete)", but nowhere in my FreeBSD travels over the > past four years have I found any suggestion of what else you're > supposed to use. The /etc/rc.local script was where local daemon startup was put. With most of the ports installed stuff, there is a foo.sh script that accepts `start' and `stop' arguments that one can put in the /usr/local/etc/rc.d directory. This tends to be the preferred way of doing things for pre RCng versions. The 5.X version of FreeBSD uses the new rc scripts (RCng) that live in /etc/rc.d and now there is the new /etc/rc.d/local scripts that fits nicely with the rest of the stuff under /etc/rc.d. To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-questions" in the body of the message
Re: Modifying /etc/rc?
In <[EMAIL PROTECTED]>, Chris Doherty <[EMAIL PROTECTED]> typed: > unless I'm wrong, /etc/rc.local exists specifically so you don't have to > modify /etc/rc. /etc/rc refers to rc.local as "traditional (but rather > obsolete)", but nowhere in my FreeBSD travels over the past four years > have I found any suggestion of what else you're supposed to use. What obsoletes /etc/rc.local is /usr/local/etc/rc.d. Server startup scripts and the like used to be bodily added to /etc/rc.local. These days, they go into /usr/local/etc/rc.d as separate scripts. That's also the correct solution for this case. Instead of trying to use the vnc script directly, use a script that sets the path and then invokes vnc. http://www.mired.org/consulting.html Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information. To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-questions" in the body of the message
Re: Modifying /etc/rc?
On Thu, Jan 30, 2003 at 02:49:07PM +0700, Roger Merritt said: > 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. /etc/rc is also something that somebody else wrote. > 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? unless I'm wrong, /etc/rc.local exists specifically so you don't have to modify /etc/rc. /etc/rc refers to rc.local as "traditional (but rather obsolete)", but nowhere in my FreeBSD travels over the past four years have I found any suggestion of what else you're supposed to use. I may not be understanding the problem you're trying to solve. HTH, Chris --- Chris Doherty chris [at] randomcamel.net "I think," said Christopher Robin, "that we ought to eat all our provisions now, so we won't have so much to carry." -- A. A. Milne --- To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-questions" in the body of the message
Re: Modifying /etc/rc?
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 [EMAIL PROTECTED] with "unsubscribe freebsd-questions" in the body of the message
Modifying /etc/rc?
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? -- Roger To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-questions" in the body of the message