Subject: a script for updating /etc
To: None <current-users@netbsd.org>
From: Jeremy C. Reed <reed@reedmedia.net>
List: current-users
Date: 10/26/2000 01:39:18
I wrote a simple shell (/bin/sh) script for updating /etc (or whatever).

Currently at http://www.reedmedia.net/misc/netbsd/update_etc/update_etc

It compares files. It allows you to add new files, look at diff's, replace
files and edit old files. I may add a few options such as merging files
together and then editing. It is similar to Debian's upgrade tool and
maybe like FreeBSD's mergemaster (which I haven't used).

To test I created two directories: OLD (copy of /etc) and NEW (untar of
etc.tgz). Later I also tested on real /etc directory. By default, it
doesn't say anything about files that are the same.

It sure did save me a lot of time. You simply press "C"ontinue or ENTER to
just ignore and skip to the next file.

Here is an example (starting with a diff of mailer.conf's):

-send-mail      /usr/pkg/sbin/exim
-mailq          /usr/pkg/sbin/exim
-newaliases     /usr/pkg/sbin/exim_newaliases
-#hoststat       /usr/libexec/sendmail/sendmail
-#purgestat      /usr/libexec/sendmail/sendmail
+sendmail       /usr/libexec/sendmail/sendmail
+send-mail      /usr/libexec/sendmail/sendmail
+mailq          /usr/libexec/sendmail/sendmail
+newaliases     /usr/libexec/sendmail/sendmail
+hoststat       /usr/libexec/sendmail/sendmail
+purgestat      /usr/libexec/sendmail/sendmail

*------------- mailer.conf -----------------*
-rw-r--r--  1 reed  staff  389 Sep 12 10:56 NEW/etc/mailer.conf
-rw-r--r--  1 reed  staff  329 Oct 25 23:06 OLD/etc/mailer.conf
mailer.conf is different
 - (C)ontinue, use (O)ld or (I)gnore
 - (R)eplace with new mailer.conf
 - show (D)ifferences between current and new
 - (E)dit old
 - (M)erge
 - (Q)uit
What do you want to do?
c
Keeping old -- skipping.

*------------- man.conf -----------------*
-rw-r--r--  1 reed  staff  1861 Sep 12 10:56 NEW/etc/man.conf
-rw-r--r--  1 reed  staff  2198 Jul 15  1999 OLD/etc/man.conf
man.conf is different
 - (C)ontinue, use (O)ld or (I)gnore
 - (R)eplace with new man.conf
 - show (D)ifferences between current and new
 - (E)dit old
 - (M)erge
 - (Q)uit
What do you want to do?

Please share your thoughts and opinions. Thanks.

   Jeremy C. Reed
   http://www.reedmedia.net/