Use-case: Laptop (or pi) running debian-flavor linux with internet via wifi. Is connects by direct ethernet cable to older HP-Laserjet with port 9100 open but without IPP printing. The script makes port 9100 availble on wifi (via iptables and avahi-publish). Printer never can see internet, and cups is not needed at all, tho cups can be running, as long as printer sharing is off.
There are commercial devices to add wifi capability to ethernet-only laser printers, but I wanted a simpler way that was as automatic as possible: the less user intervention needed the better. I know cups can share printers, but while it seemed to work at first, sometimes it would not, with cups saying "Filter failed", or garbled printouts due to postcript ppd I think.
For example, when I connected my old HP LaserJet P2055dn by usb to my debian laptop, it automatically shared it (as I told cups to share printers. But cups, without asking, chose to use a postscript driver, which did not work very well. However, when I connect by