Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 22 Apr 1996 12:02:23 -0700 (PDT)
From:      Mike Pritchard <mpp>
To:        jkh@time.cdrom.com (Jordan K. Hubbard)
Cc:        julian@ref.tfs.com, nate@sri.MT.net, current@freebsd.org
Subject:   Re: What do folks think of the following patch?
Message-ID:  <199604221902.MAA27056@freefall.freebsd.org>
In-Reply-To: <9830.830195506@time.cdrom.com> from "Jordan K. Hubbard" at Apr 22, 96 10:51:46 am

next in thread | previous in thread | raw e-mail | index | archive | help
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"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199604221902.MAA27056>