From owner-freebsd-hackers Fri Jan 29 00:41:26 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id AAA14009 for freebsd-hackers-outgoing; Fri, 29 Jan 1999 00:41:26 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from rnocserv.urc.ac.ru (rnocserv.urc.ac.ru [193.233.85.48]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id AAA13983 for ; Fri, 29 Jan 1999 00:41:15 -0800 (PST) (envelope-from joy@urc.ac.ru) Received: from urc.ac.ru (y.urc.ac.ru [193.233.85.37]) by rnocserv.urc.ac.ru (8.8.8/8.8.8) with ESMTP id NAA10963; Fri, 29 Jan 1999 13:38:56 +0500 (ES) (envelope-from joy@urc.ac.ru) Message-ID: <36B1739E.1A22A983@urc.ac.ru> Date: Fri, 29 Jan 1999 13:38:55 +0500 From: Konstantin Chuguev Organization: Southern Regional Center of FREEnet X-Mailer: Mozilla 4.5 [en] (X11; I; FreeBSD 3.0-STABLE i386) X-Accept-Language: ru, en MIME-Version: 1.0 To: Brandon Gillespie CC: freebsd-hackers@FreeBSD.ORG Subject: Re: more modular rc/init/uninit system... References: <19990129001516.A21986@cold.org> Content-Type: text/plain; charset=koi8-r Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG I don't want to make yet another flame. IMO the only thing missing in today's FreeBSD rc system is inability to REconfigure the system by changing variable values in rc.conf[.local]. I prefer to see all variables WITH their values (read "system configuration") in the one file. It is impossible in SYSV init system - you can see just various system pieces, not their initialization values. In other words, you can easily switch any service ON or OFF in SYSV. I'd prefer to customize them in more details (and again, to see them all). So, in FreeBSD system of my dream, rc.conf looks exactly the same way as for now, plus rc.* scripts know somehow about how to reconfigure each of their part. For example, it could be implemented in the way vipw works: a sysadmin runs a script which: 1. reads (includes) the (old) configuration - rc.conf[.local] - and saves it in shell variables (probably adding "old_" prefix); 2. starts an $EDITOR rc.conf[.local] allowing a sysadmin to change some variables; 3. reads (includes) the changed config file with new variable values (maybe adding "new_" prefix); 4. analyzes changes between variables, makes correspondent actions (switches interfaces up/down, changes/adds/deletes routes, loads/unloads modules, restarts daemons etc.) Of course, the key part of this is the last one. I don't think it's very difficult, but definitely it requires rewriting rc.* scripts. Probably I should already show you at least draft version of such new configure scripts. I don't have them, sorry. I wouldn't even try to write such scripts without guarantee that I won't have to rewrite them again and again in case they are not in the distribution. So it's a question of decision of all the FreeBSD community (well, at least the core team :-) about is this stuff necessary/desired. Brandon Gillespie wrote: > This sortof thing has been discussed before, and in the past I have > felt rather indifferent to the whole issue, but as I an paid to work > more and more with SYSV style systems (pretty much everything not > free, anymore) I have come to dislike some of the inadequacies of the > BSD rc/init system. Specifically: > > 1) Have you ever wanted to re-run just a small subset of what is > contained within /etc/rc or its sub ilk? And instead you ended > up skimming the code and manually cutting and pasting to get > the desired effect? > 2) Have you noticed the growing number of modularized aspects for > rc? (checkout /etc/rc.*) > 3) How many times have you wanted to shutdown and/or restart a > system process, started by these scripts and configured by > rc.conf? Your only recourse is manually doing so... > 4) What do you think of the dual standard with /etc/rc* vs > /usr/local/etc/rc.d? > > This has made me reconsider the system, and at one point I thought > about making a port/package that would frob the default rc system > to be more of a hybrid SYSV/BSD system. However, the daunting factor > of keeping it up to date has made me discard this idea. Instead, > I'll just toss it out for discussion. > > To preface, I realize (and personally believe) that the SYSV method > is overly complex. And largely irrelevant to BSD systems (without run > levels). With this in mind I've tried to workup a modular _simple_ > system that could easilly work with what we have, and would give much > benefit and gain (imho, of course :) Also note, it doesn't discard > current mechanisms, it just enhances them. So while people would need > to learn the expanded functionality, it is not a complete paradigm > shift. > > Because I am not sure if this is even of interest, I'll just point to > a page explaining my alternative hybrid idea: > > http://www.roguetrader.com/~brandon/rc-alt.html > > Frankly, it would not take much work to implement. The most work > involved would be in updating the ports/packages that currently write > their own init scripts to conform to a unified standard shared by both > system rc files and /usr/local rc files. Changing /etc/rc* to the > suggested system would probably take a day, with a week or so of testing. > > -Brandon Gillespie > > ------------------------------------------------------------------------ > Part 1.2Type: application/pgp-signature -- Konstantin V. Chuguev. System administrator of Southern http://www.urc.ac.ru/~joy/ Ural Regional Center of FREEnet, mailto:joy@urc.ac.ru Chelyabinsk, Russia. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message