Independent game development since 2003-
Steamy cyberspace hanky-panky since 2006!

FreeBSD: A love affair

So, I finally figured out how to deal with my CUPS daemon inside a jail. My home server- the one that runs this site- is pretty slick, if I do say so myself- it's a FreeBSD machine, partitioned into a whole bunch of service jails. The main one includes CUPS, which runs my shared laser printer. Problem is that it's an old parallel-port printer- it needs access ot the lpt0 device. Just getting that device to show up in the jail was a struggle, unfortunately I can't remember what I did for that. But I do know that the instructions for it petered off, such that the person could not get permanent access to the device inside the jail. Basically, I/we were trying to use /etc/devfs.rules; however, you get a major problem- the users inside the jail don't map to those outside the jail, and it seems that devfs.rules inside the jail is ignored. Therefore, you could never give the cups user/group access to /dev/lpt0 by default. So, I was running a cron script from root that would actually chown the device periodically; this still left the printer unusable after a restart for a while... and that was after I realized I could use a cron job.
So, while preparing to install misterhouse (which will require significant device in jails support), I did more research, and I finally realized that I could use /etc/devfs.conf... no issues with rules! FINALLY!
I added these lines to devfs.conf, inside the CUPS jail:
# Give the parallel port to the CUPS group
own     lpt0    root:cups
perm    lpt0    660
 
Then I did /etc/rc.d/devfs restart, and everything works when I resume the printer in cups.  Now on to misterhouse!