# Upgrading to 9.1 - resolving conflicts using VI



## tomsdongle (Jan 26, 2013)

Hello everyone 

So I decided to upgrade one of my FreeBSD boxes to version 9.1 (from 9.0 P5).

Everything goes fine until the end when im told:


```
The following file could not be merged automatically: /etc/syslog.conf
Press Enter to edit this file in vi and resolve the conflicts
manually...
```

Now /etc/syslog.conf will differ because sshguard has added a line to the file.

My problem is that when I view syslog.conf in vi it makes no sense to me at all, I understand completely how editors work however am I unsure what to do, do I remove the new line?

Thanks again,

Tom


----------



## wblock@ (Jan 26, 2013)

Please show the contents of that file.


----------



## tomsdongle (Jan 26, 2013)

```
<<<<<<< current version

# $FreeBSD: release/9.0.0/etc/syslog.conf 194005 2009-06-11 15:07:02Z avg $
=======
# $FreeBSD: release/9.1.0/etc/syslog.conf 238473 2012-07-15 10:55:43Z brueffer $
>>>>>>> 9.1-RELEASE
#
#       Spaces ARE valid field separators in this file. However,
#       other *nix-like systems still insist on using tabs as field
#       separators. If you are sharing this file between systems, you
#       may want to use only tabs as field separators here.
#       Consult the syslog.conf(5) manpage.
auth.info;authpriv.info     |exec /usr/local/sbin/sshguard
*.err;kern.warning;auth.notice;mail.crit                /dev/console
*.notice;authpriv.none;kern.debug;lpr.info;mail.crit;news.err   /var/log/messages
security.*                                      /var/log/security
auth.info;authpriv.info                         /var/log/auth.log
mail.info                                       /var/log/maillog
lpr.info                                        /var/log/lpd-errs
ftp.info                                        /var/log/xferlog
cron.*                                          /var/log/cron
*.=debug                                        /var/log/debug.log
*.emerg                                         *
# uncomment this to log all writes to /dev/console to /var/log/console.log
# touch /var/log/console.log and chmod it to mode 600 before it will work
#console.info                                   /var/log/console.log
# uncomment this to enable logging of all log messages to /var/log/all.log
# touch /var/log/all.log and chmod it to mode 600 before it will work
#*.*                                            /var/log/all.log
# uncomment this to enable logging to a remote loghost named loghost
#*.*                                            @loghost
# uncomment these if you're running inn
# news.crit                                     /var/log/news/news.crit
# news.err                                      /var/log/news/news.err
# news.notice                                   /var/log/news/news.notice
!ppp
*.*                                             /var/log/ppp.log
!*
~
~
~
```


----------



## wblock@ (Jan 26, 2013)

All right, you picked the m option in mergemaster(8).  It then put both the old and new code in the file.  The part between the <<<<<<< current version and ======= is what you had in the file.

The part between ======= and >>>>>>> 9.1-RELEASE is what it thinks that should be.

In this case, that's just a harmless version line.  So delete the first section (the old version) and the >>>>>>> 9.1-RELEASE line.

Notes:

I find these kind of merges unnecessarily confusing, and don't use them.  When mergemaster(8) finds differences, I look at the existing file in an editor and update the parts I want to change, copying from the mergemaster diffs shown and saving the file.  Selecting v to view differences again then shows fewer differences.

security/sshguard can be started from /etc/rc.conf (there's a PR for this, but it may not be in the port), so that extra line in /etc/syslog.conf is not strictly necessary.


----------



## tomsdongle (Jan 26, 2013)

Works perfectly - thank you very much


----------

