Use-case: Laptop running debian-flavor linux is connected to HP-Laserjet by ethernet, and the printer is automatically shared to wifi with no interaction by laptop user; i.e. laptop is a stand-alone single printer print server. Printer never can see internet, and is shared only to local wifi subnet.
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-browsed and/or avahi told cups to use a postscript driver, which did not work very well. However, when Iuse avahi to get model of printer, then lpinfo and grep finds the pcl3 driver I need for my particular printer. YMMV...
lpinfo -m | grep -i "HP LaserJet P2055dn"
drv:///hpcups.drv/hp-laserjet_p2055dn-pcl3.ppd HP LaserJet p2055dn pcl3, hpcups 3.22.10
So, I needed a script to tell cups to use the pcl3 driver instead of postscript. While I was at it, I would rather the connection from the laptop to the printer be by ethernet cable instead of usb but still have p