From owner-freebsd-ports@FreeBSD.ORG Mon Feb 23 15:36:47 2004 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1BAB616A4CE for ; Mon, 23 Feb 2004 15:36:47 -0800 (PST) Received: from mail.westbend.net (mail.westbend.net [65.114.87.48]) by mx1.FreeBSD.org (Postfix) with ESMTP id AD16E43D1D for ; Mon, 23 Feb 2004 15:36:46 -0800 (PST) (envelope-from hetzelsw@westbend.net) Received: from SCOT (ozgnev@scott.hnet.net [38.119.190.206]) by mail.westbend.net (8.12.10/8.12.10) with SMTP id i1NNafNu010410; Mon, 23 Feb 2004 17:36:42 -0600 (CST) (envelope-from hetzelsw@westbend.net) Message-ID: <068d01c3fa65$e5eaff50$cebe7726@westbend.net> From: "Scot W. Hetzel" To: "Thomas-Martin Seck" , References: <20040223212225.1766.qmail@laurel.tmseck.homedns.org> Date: Mon, 23 Feb 2004 17:36:41 -0600 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 X-Virus-Scanned: by amavisd-milter (http://amavis.org/) X-Spam-Status: No, hits=-0.6 required=8.0 tests=QUOTED_EMAIL_TEXT,REFERENCES,SPAM_PHRASE_01_02, USER_AGENT_OE version=2.43 Subject: Re: OPTIONS, LATEST_LINK, and RCng X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Feb 2004 23:36:47 -0000 From: "Thomas-Martin Seck" > * Oliver Eikemeier [gmane.os.freebsd.devel.ports]: > > > Don't. This is no upgrade path, either use rcNG or not, but don't change the > > behaviour of your port based on other ports configuration. If you don't like > > rcNG, stick with the old script. > > Well, you can check in your start script whether /etc/rc.subr is present > and act accordingly. I will change squid to behave this way so it can > use rcNG on a recent 5.x and "rc classic" on pre-5-system. I think this > is acceptable, isn't it? > While, it will work, it causes the port-maintainer double duty, as they have to maintain both the rcNG and the rcOLD portions of the script. Just fully convert your script to rcNG as we want to eventually get rid of all the rcOLD scripts. The rc_subr port is just a transition aid to allow these scripts to run on pre-rcNG systems. Before I submited the patches to bsd.port.mk for USE_RC_SUBR and provided the port for rc_subr. I was looking at the NetBSD tree to see how they had transitioned from their old rc system to their new rc system (rcNG). They used a mix of both rcOLD and rcNG. And I started converting my scripts to follow the way NetBSD did it. Then I looked at it again, and realized that these scripts would need to be in the tree forever. Also when anyone brings a new port in and it needs an rc.d scripts, it would also require them to use a mix of rcOLD and rcNG, so that they would stay compatible with previous releases. I determined that this mix of rcOLD and rcNG scripts wasn't acceptable and came up with our current way of creating pure rcNG scripts. > > Besides, currently you get alphabetical order no matter what you do. > > Great. So rcNG is currently not even completely working for ports? > Methinks that pulling in sysutils/rc_subr creates more problems than it > solves. (Don't get me wrong: I really like rcNG, I just don't like the > idea of a port being able to change the system startup -- and that is > what rc_subr does). No, pulling in sysutils/rc_subr solves more problems than you realize. 1. It provides a common set of functions available to all rc.d scripts (checkyesno, load_rc_config, run_rc_command, ...) 2. It provides a common set of commands available to all rc.d scripts (start/stop/restart/[status/poll]/[extra commands]) NOTE: sysutils/rc_subr is not a complete port of rcNG (it just allows rcNG scripts to run on pre-rcNG systems). The only change rc_subr does to the system startup is that it requires you to add a ${name}_enable=yes to one of the rc.conf files (/etc/rc.conf, /etc/rc.conf.local, or /etc/rc.conf.d/${name}). Which is similar to what some of the ports are currently doing, by requiring you to copy ${name}.sh-{dist,default, or sample} to ${name}.sh, before you could start them. The placing of the scripts in their proper order is the job of /sbin/rcorder (only on 5.x+). Rcorder functions by reading the comments in a rc.d script for specific keywords in order for it to determine in which order to place the script. Currently, rcorder is not being used on -Current to start the ports startup scripts because only a small portion of them have been converted. NOTE: rcorder of the ports startup scripts is planed for -Current, but they are waiting for the ports scripts to be converted. Scot