From owner-freebsd-questions@FreeBSD.ORG Wed Apr 18 23:37:00 2012 Return-Path: Delivered-To: questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 751FE106564A for ; Wed, 18 Apr 2012 23:37:00 +0000 (UTC) (envelope-from brett@lariat.net) Received: from lariat.net (lariat.net [66.62.230.51]) by mx1.freebsd.org (Postfix) with ESMTP id 2E1238FC0A for ; Wed, 18 Apr 2012 23:37:00 +0000 (UTC) Received: from WildRover.lariat.net (IDENT:ppp1000.lariat.net@lariat.net [66.119.58.2] (may be forged)) by lariat.net (8.9.3/8.9.3) with ESMTP id RAA20985 for ; Wed, 18 Apr 2012 17:23:31 -0600 (MDT) Message-Id: <201204182323.RAA20985@lariat.net> X-Mailer: QUALCOMM Windows Eudora Version 7.1.0.9 Date: Wed, 18 Apr 2012 17:23:26 -0600 To: questions@freebsd.org From: Brett Glass Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed Cc: Subject: System initialization X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Apr 2012 23:37:00 -0000 Everyone: I have several nearly identical servers in my network, and would like to control their configurations entirely from one file (such as /etc/rc.conf). Unfortunately, while some flavors of embedded Linux have systems to do this, FreeBSD doesn't make it easy. A lot of files (/etc/resolv.conf, /etc/hosts, /etc/ttys, /etc/crontab, etc.) have to be set up independently of rc.conf, and since rc.conf can be run many times at boot and thereafter (for example, /etc/rc.firewall uses it to suck in environment variables), one doesn't want to generate configuration files directly from within it, but rather should edit the configuration file for each daemon -- using environment variables in rc.conf -- just each is started. Also, it may be impossible to generate configurations for some daemons or system components before they start, so it might be necessary to start with some default file, edit it, and then send a signal to force a reconfiguration. Most of the default rc scripts, in /etc/rc and in ports, don't always provide well for generation of configuration files and/or command line options and arguments prior to starting daemons. And then, there's the question of how to restart daemons (but not the whole system!) when configurations are changed... when this is possible. Has anyone out there worked on the problem of generating configuration files for important daemons (e.g. mpd, dnscache from the djbdns suite, ntpd, etc.) at boot time based on rc.conf -- and as many as possible early enough so that the daemons whose configurations are being generated won't already have been started? And has anyone attacked the problem of dynamic reconfiguration? I'm sure I could work out my own scheme for this, but don't want to reinvent the wheel if someone's already come up with a clever system to do it on FreeBSD. --Brett Glass