freebsd-udapte upgrade.

Paul Mather paul at gromit.dlib.vt.edu
Wed Nov 5 19:29:44 UTC 2014


> On Nov 5, 2014, at 1:58 PM, Peter Ankerstål <peter at pean.org> wrote:
> 
> 
> 
>>> On 5 nov 2014, at 19:53, Scot Hetzel <swhetzel at gmail.com> wrote:
>>> 
>>> On Wed, Nov 5, 2014 at 8:30 AM, Peter Ankerstål <peter at pean.org> wrote:
>>> Could someone please explain how to use freebsd-update upgrade without
>>> destroying all of your configuration files?
>>> 
>>> I really don't understand how to use the merge function.. In this case i
>>> typed :q for all files it asked about. :wq seem to
>>> do about the same thing. Notice that a few of the files has this shit in
>>> multiple places. I can't be right that I should edit every file manually and
>>> look for "current version" and so on?
>> Most likely what happened is that when you used :wq it wrote the
>> contents of the diff between your current version and the new version
>> to your existing configuration files.  If you had stuck to using :q,
>> it should have left your existing configuration files alone.
> 
> This was done with :q only. I dont get it.

When you upgrade using freebsd-update, it will try and update configuration files automatically.  If there are any configuration files whose differences can't be resolved automatically, it will present that file for editing with the merge conflicts in the file presented.  You are then supposed to resolved the conflicts manually.

I've always resolved any conflicts, so I've not had any experience if you simply ":q" from the editor, thereby leaving in all the conflict markers.  If freebsd-update doesn't check for unresolved conflicts and force you to edit the file again, I presume your configuration file will now basically be invalid.

Maybe this is what happened in your case?

Cheers,

Paul.


More information about the freebsd-stable mailing list