Upgrade merge file issue

During a minor upgrade from 11.1 to 11.2 a file merge failed for /etc/ssh/sshd_config. During the edit of this file, I didn't pay attention to the upgrade adding the following lines. "<<<<<<< current version" and ">>>>>>> 11.2-RELEASE" both these lines caused a syntax error after a reboot and ssh wasn't loaded. Can someone explain the reason for adding lines during an upgrade that will cause a critical service to fail?
 
It should had happened while you were using mergemaster(8). These lines are to indicate where the changes happened and so you know what you need to do to merge the changes.

When you don't want to do any change in the file (keep you modified file) you have the option to use `d` (delete) during the mergemaster process, which will remove the temporary stored default file, and keep your modified file intact.
 
This isn't mergemaster(8). This is freebsd-update(8) which uses sdiff(1). It is part of the upgrade procedure that it merges configuration changes in /etc and you have to know what you are doing so that you complete the upgrade correctly.

You need to edit the file and manually merge the conflicts between the old version and the new version. It will have split the file using those <<< and >>> blocks where one side is the old and the other side is the new. Simply delete or edit those blocks until you are satisfied with the finished result, delete the conflict block lines, and save the file.
 
It will show the differences of the existing files and the to be installed new files and asks what to do. If you don't pay attention to what you're being asked the merge tool will save the differences in the files for you to solve. This is by design because there is no automatic way to solve the conflicts, leaving the old files as they are is equally dangerous as automatically installing the new files over the changed old ones.
 
Back
Top