From owner-freebsd-ports-bugs@FreeBSD.ORG Thu Jul 10 17:55:17 2014 Return-Path: Delivered-To: freebsd-ports-bugs@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DBD8C3B2 for ; Thu, 10 Jul 2014 17:55:17 +0000 (UTC) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A829A237B for ; Thu, 10 Jul 2014 17:55:17 +0000 (UTC) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.14.8/8.14.8) with ESMTP id s6AHtHnY011949 for ; Thu, 10 Jul 2014 17:55:17 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-ports-bugs@FreeBSD.org Subject: [Bug 191781] [patch] multimedia/webcamd - much improved rc.d script Date: Thu, 10 Jul 2014 17:55:17 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports Tree X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: dreamcat4@gmail.com X-Bugzilla-Status: Needs Triage X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-ports-bugs@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Jul 2014 17:55:17 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D191781 --- Comment #7 from dreamcat4@gmail.com --- I have just had yet another idea for improvement. If you guys are interested please say so: Can be added a feature to auto-resolve any connected devices which match a specific USB vendor id string. This is useful, as I noticed the device numb= er change from 7.3 -> 7.2 on reboot. Not even re-pluggin it then (because was = some previous some hot-plugging in the same uptime session, the first 7.2 slot w= as not re-used). rc.d script can be programmed to search the USB vendor id string from gripp= ing the output of 'usbconfig' command: $usbconfig ... ugen2.2: at usbus2, cfg=3D0 md=3DHOST spd= =3DHIGH (480Mbps) pwr=3DON (500mA) ... ugen7.2: at usbus7, cfg=3D0 md=3DHOST spd=3DHIGH (480Mbps)= pwr=3DON (500mA) If the user want to set in rc.conf: webcamd_device_0_name=3D"Acer Crystal Eye webcam SuYin" webcamd_device_1_name=3D"SCEH-0036 SONY" etc=E2=80=A6 webcamd_device_$n_name=3D This would be the list of device names to recognise. If found multiple identical device models, all will be loaded on match the same USB vendor id string (since no way to distinguish, unless USB each has some serial number= , i don't know). It can be in addition to the other ways already provided. So the previous w= ays still remain too. I can get the rc.d script to grep usbconfig command, extract the "ugen2.2" = and "ugen7.2" field which match the grep command. Then that is enough informati= on to launch instances in a new 3rd loop (similar way like is previously alrea= dy done for a similar mechanism). This also mean that if someone want to setup devd to automatically restart webcamd on hot-plugging USB events, then the new "ugen" device numbers will= be found correctly on next restart, since the number isn't required to be hard-coded. What to you guys think about that? --=20 You are receiving this mail because: You are the assignee for the bug.=