From owner-freebsd-questions@FreeBSD.ORG Sat Apr 4 20:48:04 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4AC391065676 for ; Sat, 4 Apr 2009 20:48:04 +0000 (UTC) (envelope-from o.roeschke@gmx.net) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by mx1.freebsd.org (Postfix) with SMTP id 881B78FC0A for ; Sat, 4 Apr 2009 20:48:03 +0000 (UTC) (envelope-from o.roeschke@gmx.net) Received: (qmail invoked by alias); 04 Apr 2009 20:21:22 -0000 Received: from wipux2.wifo.uni-mannheim.de (EHLO [127.0.0.1]) [134.155.48.202] by mail.gmx.net (mp029) with SMTP; 04 Apr 2009 22:21:22 +0200 X-Authenticated: #26761920 X-Provags-ID: V01U2FsdGVkX1+2g70MiUO2q+A8NxZv3zUs8WeXqPGYZJBMsrTuGg jFOqrfDdhXSAh5 From: Oliver Roeschke To: freebsd-questions@freebsd.org Content-Type: text/plain Date: Sat, 04 Apr 2009 22:13:08 +0200 Message-Id: <1238875988.2667.37.camel@phoenix.blechhirn.net> Mime-Version: 1.0 X-Mailer: Evolution 2.24.5 Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-FuHaFi: 0.72 Subject: Executing command on USB connect X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: o.roeschke@gmx.net List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Apr 2009 20:48:04 -0000 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? Regards, Olli