Sunday, March 11, 2007

Updating the etc.tgz set

After installing the OpenBSD I noticed that there were a few corrected bugs for my release (4.0) at www.openbsd.org/errata40.html. So, I figure it was time to upgrade. Everything went very smoothly, reading the release(8) manpage was enough to teach myself how to create a release with the patches. I'm currently following the -stable branch (patch branch), by the way.

After creating my release and installing it I found out that I was to merge the differences on the configuration files by myself. Doing so by hand is very tedius, so I wrote my own script to help me out. It will be helpful when I'm to upgrade to openbsd 4.1 also.

The usage of the script is very simple. Just decompress the etc.tgz set on some directory (in my case it was /tmp/config) and execute the program like this:
sh update-etc /tmp/config

I've done a little testing, but not too much, so it may still have some bugs, specially because I'm not really used to shell programming (I could write it in python, the scripting language I'm most confortable, but I wanted it to be compatible with openbsd out of the box). It has been working fine by now, if I find any bugs I'll make a new post telling everyone (I'll update this post also). If you find some bug tell me and I'll fix it.

Without any further ado, this is the script:
http://www.dcc.ufmg.br/~rafaelc/update-etc
download it, and have fun!

No comments: