rancid-run(1)

πŸ’– rancid-run β€” the manual page, but make it cute πŸ’–

okay bestie, welcome to rancid-run(1) from the General Commands Manual section, and honestly? she's a baddie. let's get into it.


✨ NAME ✨

rancid-run β€” run rancid for each of the groups 🫢


✨ SYNOPSIS ✨

rancid-run [-V]
[-c commit_msg] [-f rancid.conf] [-m mail_rcpt] [-r device_name] [group
[group ...]]

✨ DESCRIPTION ✨

so rancid-run is a sh(1) script whose whole job is running rancid(1) for a set of rancid group(s). she's the group chat admin of rancid, fr fr πŸ’…

here's the tea: rancid-run reads rancid.conf(5) to configure herself, then uses control_rancid(1) to run rancid(1) for each rancid group. the set of rancid groups can either come in as command-line arguments, or via the LIST_OF_GROUPS variable in rancid.conf(5) if you just... don't pass the group argument at all. no pressure. she's flexible like that. πŸ¦‹

a lock file is maintained per-group to prevent simultaneous runs for a given group by rancid-run(1). the lock file gets named .<group>.run.lock and lives in /var/lib/rancid. yes, the leading dot is doing its little hidden-file thing, iconic behavior. ✨

a log file is produced under $LOGDIR/logs for each rancid group processed. the file name is <group>.YYYYMMDD.HHMMSS (that's year month day . hour minute second, in case you were squinting πŸ‘€).

rancid-run is normally used to run rancid from cron(8). for example:

0 * * * *      /usr/local/rancid/bin/rancid-run

the command-line options are as follows:

  • -V β€” prints package name and version strings. that's it, that's the whole vibe check. πŸ’«
  • -c commit_msg β€” specify an alternative SCM commit message.
  • -f rancid.conf β€” specify an alternate configuration file.
  • -m mail_rcpt β€” specify the recipient of diff mail, which is normally rancid-<group>. the argument may be a single address, multiple comma separated addresses, or -m may be specified multiple times. stack 'em, queen. πŸ‘‘
  • -r device_name β€” run rancid for a single device, device_name. device_name should be name, as it appears in a group's router.db. the device must be marked "up". if a group is not specified on the command-line, rancid will be run against any group in which the device_name appears.

the -r option alters the subject line of the diff mail. it will begin with <group name>/<device name> rather than just the group name alone. main character energy in the subject line, honestly. πŸŽ€


✨ ENVIRONMENT ✨

rancid-run utilizes the following environment variables from rancid.conf(5). she's not nosy, she's just informed. πŸ’…

  • BASEDIR β€” location of group directories, etc. this is set to the "localstatedir" by the configure script at installation time.
  • LIST_OF_GROUPS β€” list of rancid groups to collect.
  • PATH β€” search path for utilities.
  • TMPDIR β€” directory to hold temporary files.

✨ ERRORS ✨

if rancid fails to run or collect a device's configuration, the particular group's log file (mentioned above πŸ‘†) should be consulted. any errors produced by the revision control system (CVS, Subversion, or git) or any of the rancid scripts should be included there, whether they be a botched cvs tree, login authentication failure, rancid configuration error, etc. she logs everything, no cap. πŸ’€

if the log file produces no clues, the next debugging step should be to run the commands manually. for example: can the user who runs rancid login to the device with 'clogin hostname', and so on. get your hands in there, bestie, detective mode activated πŸ•΅οΈ


✨ FILES ✨

  • $BASEDIR/etc/rancid.conf β€” rancid-run configuration file.

✨ SEE ALSO ✨

control_rancid(1), rancid.conf(5), router.db(5)

go read those too, they're giving lore. πŸ“š


✨ CAVEATS ✨

🚨 DO NOT leave temporary files in the <group name>/configs directory, they WILL be removed by control_rancid(1). like, gone-gone. the subdirectory <group name>/configs/.old can be used for this purpose. put your lil temp files there instead, okay? πŸ₯Ί

and that's the whole page, bestie!! this version came to you courtesy of the source dated 21 July 2021 πŸ’– stay safe out there, don't leave temp files where you shouldn't, and remember: your cron jobs could never do it like rancid-run does. periodt. πŸ’…βœ¨πŸŒˆ

πŸ“¦ where this page comes from