I'm certain this is documented somewhere, but danged if I can find it. I have a whole variety of custom scripts in /usr/local/etc/rc.d. For years now, simply giving them a name ending in .sh and making them executable has been sufficient to make them start on boot. On 5.x, it's not. And now, having upgraded to 4.11-s on some older boxes and running portupgrade -a, it's not. Obviously these scripts need something else. There's no fancy rcNG infrastructure in them; is rcNG a requirement for startup scripts now? Any pointers on where I can find the right documentation? Thanks, ==ml -- Michael W. Lucas mwlucas@FreeBSD.org, mwlucas@BlackHelicopters.org http://www.BlackHelicopters.org/~mwlucas/ "The cloak of anonymity protects me from the nuisance of caring." -Non Sequitur
For scripts in /usr/local/etc/rc.d You should add an entry to /etc/rc.conf. For example, if You script is somedaemon.sh, then add somedaemon_enable='YES' to /etc/rc.conf and it will run at the next boot. Cheers, G?bor K?vesd?n Michael W. Lucas wrote:>I'm certain this is documented somewhere, but danged if I can find it. > >I have a whole variety of custom scripts in /usr/local/etc/rc.d. For >years now, simply giving them a name ending in .sh and making them >executable has been sufficient to make them start on boot. > >On 5.x, it's not. And now, having upgraded to 4.11-s on some older >boxes and running portupgrade -a, it's not. > >Obviously these scripts need something else. There's no fancy rcNG >infrastructure in them; is rcNG a requirement for startup scripts now? >Any pointers on where I can find the right documentation? > >Thanks, > >==ml > > >
You have to in rc.conf variable to run application as was for ssh and others in this way: if you want to run samba and dhcpd you have to put into rc.conf this: samba_enable="YES" dhcpd_enable="YES" Il giorno mar, 14/06/2005 alle 11.02 -0400, Michael W. Lucas ha scritto:> I'm certain this is documented somewhere, but danged if I can find it. > > I have a whole variety of custom scripts in /usr/local/etc/rc.d. For > years now, simply giving them a name ending in .sh and making them > executable has been sufficient to make them start on boot. > > On 5.x, it's not. And now, having upgraded to 4.11-s on some older > boxes and running portupgrade -a, it's not. > > Obviously these scripts need something else. There's no fancy rcNG > infrastructure in them; is rcNG a requirement for startup scripts now? > Any pointers on where I can find the right documentation? > > Thanks, > > ==ml >Darek ________________________________________________________________________ An rud a l?onas an ts?il l?onann s? an cro? - What fills the eye fills the heart
On Tue, 14 Jun 2005, Michael W. Lucas wrote:> > I'm certain this is documented somewhere, but danged if I can find it. > > I have a whole variety of custom scripts in /usr/local/etc/rc.d. For > years now, simply giving them a name ending in .sh and making them > executable has been sufficient to make them start on boot. > > On 5.x, it's not. And now, having upgraded to 4.11-s on some older > boxes and running portupgrade -a, it's not. > > Obviously these scripts need something else. There's no fancy rcNG > infrastructure in them; is rcNG a requirement for startup scripts now? > Any pointers on where I can find the right documentation? >You might want to look at `man rc.d`. There are example scripts there. When I went to 5.x I updated all of my rc.d scripts to use what's labeled there as the "old style" format like: The following is a simple, hypothetical example of an old-style /usr/local/etc/rc.d/ script, which would start a daemon at boot time, and kill it at shutdown time. #!/bin/sh - # # initialization/shutdown script for foobar package case "$1" in start) /usr/local/sbin/foo -d && echo -n ' foo' ;; stop) kill `cat /var/run/foo.pid` && echo -n ' foo' ;; *) echo "unknown option: $1 - should be 'start' or 'stop'" >&2 ;; esac SEE ALSO kill(1), rc.conf(5), init(8), rcorder(8), rc.subr(8), reboot(8), savecore(8) HISTORY The rc utility appeared in 4.0BSD. FreeBSD 5.4 November 4, 2002 FreeBSD 5.4 | Mitch Parks * mitch@uidaho.edu | "I bring you love and deeper understanding." - Kate Bush
Hi, i have follows your trouble with rc-scripts. now im usind BSD for many years and i know! that *sh-ish rc-scripts should be supported. But this is not my interest. you have writte that the boxes with these behavior was updated from RELENG_4 to RELENG_5? right? if so double-check all these thinks you are doit to update.... reread the migration-guide and diff the rc-scripts and the binaries. my suggestion is somthing was going wrong with the update...... if the restly enviroment was leaved (profiles etc...) regards michael