Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 14 Jun 2001 20:19:27 +0300
From:      Peter Pentchev <roam@orbitel.bg>
To:        Danny Braniss <danny@cs.huji.ac.il>
Cc:        Warner Losh <imp@harmony.village.org>, Sheldon Hearn <sheldonh@starjuice.net>, freebsd-hackers@FreeBSD.ORG
Subject:   Re: rc, was: Re: Plan to import NetBSD rc system
Message-ID:  <20010614201927.D729@ringworld.oblivion.bg>
In-Reply-To: <E15ARsN-00062o-00@sexta.cs.huji.ac.il>; from danny@cs.huji.ac.il on Thu, Jun 14, 2001 at 10:49:11AM %2B0300
References:  <roam@orbitel.bg> <E15ARsN-00062o-00@sexta.cs.huji.ac.il>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Jun 14, 2001 at 10:49:11AM +0300, Danny Braniss wrote:
> 
> > I've asked -ports before whether it is suitable to let ports startup scripts
> > honor /etc/rc.conf{,.local} settings by sourcing /etc/defaults/rc.conf and
> > then running a source_rc_confs (or whatever is appropriate).
> 
> my suggestion:
> 
> this is the 'modified' loop for the ${local_startup} in /etc/rc:
> 
> case ${local_startup} in
> [Nn][Oo] | '')
> 	;;
> *)
> 	echo -n 'Local package initialization:'
> 	for dir in ${local_startup}; do
> 		if [ -d "${dir}" ]; then
> 			for script in ${dir}/*.sh; do
> 				s=`basename ${script} .sh` 
> 				v=`eval echo '$'${s}_enable|dd conv=ucase`
> 				if [ -x "${script}" -a ${v} = YES ]; then
> 					(set -T
> 					 trap 'exit 1' 2
> 					 ${script} start)
> 				fi
> 			done
> 		fi
> 	done
> 	echo '.'
> 	;;
> esac
> 
> you just add: mysql_enable="YeS"

OK, and what do I do if I want to manually start/stop the service later,
and it needs variables defined in /etc/rc.conf{,local} ?

G'luck,
Peter

-- 
This sentence would be seven words long if it were six words shorter.

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




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