Extract OpenBSD System Configuration

The target for this solution is to be able to extract the difference from a freshly installed OpenBSD system and the current state of working OpenBSD based appliance or server. Using this configuration package it should be easy to replicate the setup a new machine (possibly on a new version of OpenBSD).

The solution should try to determine system configuration through the following means.

  • Check installed packages with pkg_info -m
  • Check updated or new configuration files in /etc, /var/cron
  • Find system management utilities in /root/bin and/or /usr/local
  • Changes in file permissions

The system use a fresh OpenBSD install to check changes against very similar to the sysmerge(8) utility.

This may be used as complement with other installation instructions for a OpenBSD based appliance or server.

The may also be an option to apply the changes interactively on a new system.

  • New files should be installed
  • Updated files should be merged (while keeping original)
  • Deleted files should be moved to a temporary location

To make changes as relevant as possible the install process might be done in a virtual machine in the following steps.

  1. Install packages in the VM get default configuration files
  2. Diff between VM and running system to identify changes