Executing command on USB connect
vince at unsane.co.uk
Sat Apr 4 14:02:53 PDT 2009
On 4/4/09 21:13, Oliver Roeschke wrote:
> Hi folks,
> I'm using a HP Laserjet P1006 on a freebsd with cups to make the printer
> available on the network.
> Since this modell is one of the crapy-cheap-laserjets it has some
> firmware you have to upload, everytime the printer has lost power.
> Currently I'm doing this via a cron job once a hour, but it's not
> satisfying, since the printer is located in the office of a customer and
> at max he has to wait 1h until he can use the printer.
> So my question is, how can I execute the command which uploads the
> firmware (which is nothing more than a 'cat firmware > /dev/ugen0.1')
> whenever the printer is connected?
Sounds like a job for devd, there are a few examples in /etc/devd.conf
that do firmware downloading which should be enough to get you started.
> freebsd-questions at freebsd.org mailing list
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe at freebsd.org"
More information about the freebsd-questions