Files
ports/sysutils/rancid/pkg
ajacoutot c4096e6659 Stop using the daemon class in @newuser.
If we need to make an exception we can do it and properly document the
reason but by default we should just use the default login class.
rc.d uses daemon or the login class provided in login.conf.d so this has
no impact there.

discussed with sthen@, tb@ and robert@

praying that my grep/sed skills did not break anything and still
believing in portbump :-)
2022-11-08 11:16:56 +00:00
..
2022-11-08 11:16:56 +00:00

+-----------------------------------------------------------------------
| Running ${PKGSTEM} on OpenBSD
+-----------------------------------------------------------------------

On OpenBSD, RANCID lives and works in ${LOCALSTATEDIR}, with user id _rancid.

Quick Installation Guide (an example):

1) Modify ${SYSCONFDIR}/rancid/rancid.conf.  The variable LIST_OF_GROUPS is
   a space delimited list of router "groups".
   e.g.:
	LIST_OF_GROUPS="backbone aggregation switches"

2) Create ${LOCALSTATEDIR}/.cloginrc, with read/write permissions only for
   the _rancid user, e.g. 0600 or 0640.

   Review ${TRUEPREFIX}/share/examples/rancid/cloginrc.sample for examples
   and a good starting point.  See also cloginrc(5).

   Test to make sure that you can login to every router.

3) Set up mail aliases, by modifing /etc/mail/aliases.  Rancid
   sends the diffs and other administrative emails to rancid-<GROUP> and
   problems to rancid-admin-<GROUP>, where <GROUP> is the "GROUP" of
   routers.  This way you can separate your backbone routers from your
   access routers or separate based upon network.

4) Initialize RANCID CVS repository with `rancid-cvs' as the _rancid
   user.  This creates all of the necessary directories and config files
   for each of the groups in LIST_OF_GROUPS and imports them into CVS.
   This will also need to be run each time a new group is added.  Do not
   create the directories or CVS repository manually, allow rancid-cvs
   do it.  See also rancid-cvs(1).

5) For each "group", modify the router.db file in the group directory.
   The file is of the form "router;mfg;state", where "router" is
   the name (we use FQDN) of the router, mfg is the manufacturer from
   the set of (cat5|cisco|juniper), and "state" is either up or down.
   Each router listed as "up" will have the configuration grabbed.
   Note: manufacturer cat5 is intended only for cisco catalyst switches
   running catalyst (not IOS) code.  See also router.db(5).

6) For first-time users or new installations, run `rancid-run' (with no
   arguments) as the user _rancid and check the resulting log file(s)
   (in ${LOCALSTATEDIR}/logs/*) for errors.  Repeat until there are no
   errors.

7) Put `rancid-run' in _rancid's crontab to be called however often you
   want it to run for each group (rancid-run [<GROUP>]).  If you run it
   less often than once/hour, check the setting of OLDTIME in
   ${SYSCONFDIR}/rancid/rancid.conf.

   Example:
	# run config differ hourly
	1 * * * * ${TRUEPREFIX}/bin/rancid-run
	# clean out config differ logs
	50 23 * * * /usr/bin/find ${LOCALSTATEDIR}/logs -type f -mtime +2 -exec rm {} \;