Date: Wed, 10 Feb 1999 10:57:57 -0500 From: "David E. Cross" <crossd@cs.rpi.edu> To: freebsd-hackers@FreeBSD.ORG Subject: suggestion for modular system configuration Message-ID: <199902101557.KAA01257@cs.rpi.edu>
next in thread | raw e-mail | index | archive | help
I suggested this once before, but I never even saw my own post (I usually do), so I will assume it got tossed in a bit bucket somewhere. We have a large number and diversity of systems here, Irix, Solaris, FreeBSD, and I have worked with DG-UX, SCO, OSF/1, Digital Unix, and a couple of others I cannot remember at a previous job. Of all of these Irix has the easiest and most flexable configuration utility for the stuff that rc.conf does, 'chkconfig'. It is a trivial program that works like the following: if chkconfig inetd; then /usr/sbin/inetd fi when chkconfig is run it looks for a file named /etc/config/$argv[1], that file simply contains one word 'on' or 'off'. If the file contains 'on', chkconfig returns true, 'off' false. This allows one to simply untar a file (or a couple of files) into the directory w/o having to edit any scripts, and have all of the new configs in place. I propose that we adopt this system, with a couple of modifications that will make it even more powerfull and usefull. Have an optional variable 'CHKCONFIGPATH', that would behave similarly to 'XUSERFILESEARCHPATH' with respect to haveing some optional '%' expansions. Here is a preliminary idea: %N _N_ame, equal to what is passed in argv[1]. %H _H_ost, fqdn. %h _h_ost, hostname. A CHKCONFIGPATH path element that had no '%' expansions in it would default to ending with '/%N'. A reasonable default CHKCONFIGPATH may well be: /etc/config/%N:/usr/local/etc/config/%h/%N:/usr/local/etc/config/%N -or perhaps- /etc/config/%h/%N:/etc/config/%N:/usr/local/etc/config/%h/%N:/usr/local/etc/config/%N (the occurance in the path 'wins'). This has tremendous potential, such as being able to reconfigure a system w/o ever needing to log into it (usefull for example if a service is running amuck, and you cannot log into the system; change the config, reboot (which I am assuming for this argument you need to do anyway :), and it comes back w/o haveing to be on console to alter the boot proces at all. This would be a huge win for us here as we have a shared /usr/local, and with putting 'httpd.sh' in /usr/local/etc/rc.d as well as netatalk.sh and others we have had to do some special things to get only certain packages to run on certain hosts (it usually involves sucking in the entire rc.conf for EVERY SINGLE rc-file... as is already done by the system rc-files. *yuck*) -- David Cross 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?199902101557.KAA01257>