CHKPRINTCAP(8)

πŸ“¦ version 15.1, in freebsd 14.5, freebsd 15.1

πŸ’… CHKPRINTCAP(8) β€” like, the print spooler database validity check, bestie

ok so this is a page from the System Manager's Manual, and we're talking about chkprintcap β€” yes it's a mouthful, yes it's iconic, let's go πŸŽ€


✨ NAME ✨

chkprintcap β€” bestie, it checks the validity of entries in the print spooler database πŸ–¨οΈπŸ’–


🌸 SYNOPSIS 🌸

chkprintcap [-d] [-f printcap]

🚨 DEPRECATION NOTICE 🚨

Okay so heads up, this facility is scheduled for removal prior to the release of FreeBSD 16.0. 😭 Like, enjoy it while it lasts, fr fr.

πŸ¦‹ DESCRIPTION πŸ¦‹

so the chkprintcap utility scans a printcap(5) database β€” and that database is named by the printcap argument, or by default it's /etc/printcap β€” looking for entries that are invalid in one way or another. vibe check on the whole file basically πŸ’…

the following checks are currently implemented:

  1. β€˜tc=’ references were properly expanded ✨
  2. β€˜tc=’ references did not form a loop πŸ”πŸ’€ (no infinite loop shenanigans, we're not doing that today)
  3. no two printers share the same spool directory (β€˜sd=’ capability) πŸ™ˆ nobody gets to share a locker, that's the rule

the chkprintcap utility exits with a status equal to the number of errors encountered before processing stopped. (and yeah, in some cases, processing can stop before the entire file is scanned β€” it's giving "we tried" 🫢)

if the -d flag is given, chkprintcap will attempt to create any missing spool directories, giving them β€˜u=rwx,go=rx’ (0755) mode, group β€˜daemon’, and the owner specified by the β€˜du=’ capability in the database (default 1, which corresponds to user β€˜daemon’). slay, it's making directories for you πŸ‘‘


πŸ”₯ SEE ALSO πŸ”₯

iykyk, go read those too πŸ“š


πŸ‘‘ AUTHORS πŸ‘‘

the chkprintcap utility was written by Garrett A. Wollman <wollman@lcs.mit.edu>. thank you king 🫢


πŸ’€ BUGS πŸ’€

not enough sanity-checking is done, ngl 😭 at a minimum, the ownership and mode of the spool directories should also be checked. other parameters whose value could cause lpd(8) to fail should be diagnosed. like, there's room to grow bestie, the potential is THERE 🌈


and that's the whole page!! ✨ mwah πŸ’‹

this gem came from the Debian folks, dated November 30, 1997 β€” yes, a 90s baby, and it's still out here doing its thing πŸ’œπŸŽ€

πŸ“¦ where this page comes from