Another possibility to help during configuration files upgrades would be to use Config::Model.

To provide configuration files upgrade, this tool needs:

Debian default configuration can be specified in the description above.

When upgrading, Config::Model will:

The only drawback (currently) is that comments are lost.

As a bonus, the user will get graphical or curses interfaces to further customize configuration data.

If you want to play with this upgrade feature, you can try it with /etc/ssh/sshd_config upgrade. (See Config::Model::OpenSsh)

Feel free to contact Config::Model author if you need more explanations on upgrade possibilities with Config::Model