Subject: Re: Updating /etc after upgrade
To: Dwight Tuinstra <>
From: Frederick Bruckman <>
List: current-users
Date: 08/10/2000 15:34:35
On Thu, 10 Aug 2000, Dwight Tuinstra wrote:

> I'm new to NetBSD, so please bear with me.  I need to know what happens
> to the files in /etc during an upgrade, since I'll be tracking 1.5_ALPHA
> as part of a research effort on log-based file systems.
> The INSTALL file for 1.5_ALPHA, in the section titled "Upgrading a
> previously-installed NetBSD System", states that "existing configuration
> files in /etc are backed up and merged with the new files."  However, a
> search of the mail archives indicates that this might be limited to just
> preserving the old fstab and copying it back to /etc after the upgrade. 

It configures the network interfaces too, but except for that, you'll
basically have to merge everything from /etc.old by hand. That's only
if you do binary upgrades -- "make build" doesn't touch /etc at all.

> I follow FreeBSD, and there are often important changes in /etc --- not
> only contents of files, but sometimes changes in what files exist and
> where they are located.  So, my questions:
>   1)  To what extent is this true of NetBSD?

Only after ponderous discussion. There were some big changes from
1.4.x to 1.5, but you said you'd be tracking -current closely, and
you're on this mailing list, so you won't miss anything like that.

Wait. You said you'd be tracking 1.5_ALPHA closely, which means, what,
you're tracking netbsd-1-5? [1.5_ALPHA is tagged, and will never
change.] If that's the case, structural changes in the branch are a
no-no, so your task will be much easier.

>   2)  What's the best way to examine /etc and
>       resolve differences between old and
>       upgraded files?  In particular, is there
>       anything like FreeBSD's "mergemaster"?

"diff -r -u /etc.old /etc | less". No, sorry. :-P

I frequently use vi's copy and paste to merge in all the extraneous
comments and cvs tags, so the important diffs stand out.

As I've been tracking netbsd-1-5, I notice the main thing that changes
is the /etc/rc.d scripts, and associated goo. Since I'm building from
source, I only have to examine the newest files in /usr/src/etc.
[Parts of /etc come from throughout the tree, but these rarely change.
To be thorough, I do a "make distribution" from time to time to
compare with the new, complete /etc. It's possible to download
etc.tar.gz from a recent snapshot.] Typically, I'll copy in all the
/etc/rc.d scripts; rc.subr, and friends; then remove any old /etc/rc.d
scripts that aren't my own, then merge in the new variables to

It's worth noting that most of the changes and improvements to /etc
are orthogonal to the Userland changes. Anything that's really
important (portmap -> rpcbind) is obvious from the displayed errors.