From owner-freebsd-current Mon Apr 22 12:02:25 1996 Return-Path: owner-current Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id MAA27062 for current-outgoing; Mon, 22 Apr 1996 12:02:25 -0700 (PDT) Received: (from mpp@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id MAA27056 Mon, 22 Apr 1996 12:02:24 -0700 (PDT) From: Mike Pritchard Message-Id: <199604221902.MAA27056@freefall.freebsd.org> Subject: Re: What do folks think of the following patch? To: jkh@time.cdrom.com (Jordan K. Hubbard) Date: Mon, 22 Apr 1996 12:02:23 -0700 (PDT) Cc: julian@ref.tfs.com, nate@sri.MT.net, current@freebsd.org In-Reply-To: <9830.830195506@time.cdrom.com> from "Jordan K. Hubbard" at Apr 22, 96 10:51:46 am X-Mailer: ELM [version 2.4 PL24] Content-Type: text Sender: owner-current@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Jordan K. Hubbard wrote: > [...] > Similarly, not updating your /etc/sysconfig but updating your > /etc/netstart (say) can also get you into grief when some calling > convention changes and you've now just broken yourself by updating > only one half of the equation. /etc/sysconfig is the one thing I modify in /etc that I think is a pain in the ass to upgrade. Perhaps sysconfig should be created by a shell script, along the lines of: #!/bin/sh # # gensysconfig - generate a skeleton /etc/sysconfig, possibly # using the currently installed version to obtain current settings. nfs_client=NO nfs_server=NO [...all of the default sysconfig variables would be set here...] if [ $1 = "upgrade" ] then . /etc/sysconfig #get our current values fi cat <<__EOF__ # This is sysconfig - a file full of useful variables that you can set # to change the default startup behavior of your system. [...] # Set to YES if this machine will be an NFS client nfs_client=$nfs_client # Set to YES if this machine will be an NFS server nfs_server=$nfs_server [...] __EOF__ This would make upgrading to a new sysconfig trivial when new configuration options are added. Things get trickier when the meaning of an existing option changes somehow, but I can live with that, since I usually look at the diffs before deciding when I want to upgrade my /etc files anyways. -- Mike Pritchard mpp@FreeBSD.org "Go that way. Really fast. If something gets in your way, turn"