From owner-freebsd-current@FreeBSD.ORG Wed Mar 1 23:27:41 2006 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CD23B16A423 for ; Wed, 1 Mar 2006 23:27:41 +0000 (GMT) (envelope-from maksim.yevmenkin@savvis.net) Received: from ismybrain.com (ismybrain.com [64.246.42.25]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7C1A143D58 for ; Wed, 1 Mar 2006 23:27:41 +0000 (GMT) (envelope-from maksim.yevmenkin@savvis.net) Received: from [10.254.186.111] (localhost.localdomain [127.0.0.1]) by ismybrain.com (8.11.6/8.11.6) with ESMTP id k21NReM30128 for ; Wed, 1 Mar 2006 18:27:40 -0500 Message-ID: <44062DE7.8090508@savvis.net> Date: Wed, 01 Mar 2006 15:27:35 -0800 From: Maksim Yevmenkin User-Agent: Mozilla Thunderbird 1.0.2 (X11/20050404) X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-current@freebsd.org Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 7bit Subject: [PATCH] kbdmux(4) and devd(8) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Mar 2006 23:27:41 -0000 Dear Hackers, any comments/objections/etc. to the following devd.conf patch? the idea is to prevent devd(8) from trying to switch keyboards when kbdmux(4) is the default keyboard. the 'attach' action will fail anyway, however, the 'detach' action may succeed (if /dev/kbd0 is not is the kbdmux(4)). another idea is to comment out these entries if/when kbdmux(4) will become default. thanks, max Index: devd.conf =================================================================== RCS file: /home/ncvs/src/etc/devd.conf,v retrieving revision 1.30 diff -u -r1.30 devd.conf --- devd.conf 11 Dec 2005 00:18:28 -0000 1.30 +++ devd.conf 1 Mar 2006 23:21:55 -0000 @@ -99,11 +99,11 @@ # When a USB keyboard arrives, attach it as the console keyboard. attach 100 { device-name "ukbd0"; - action "kbdcontrol -k /dev/ukbd0 < /dev/console && /etc/rc.d/syscons restart"; + action "(kbdcontrol -i < /dev/ttyv0 | grep kbdmux) > /dev/null 2>&1 || (kbdcontrol -k /dev/ukbd0 < /dev/ttyv0 && /etc/rc.d/syscons restart)"; }; detach 100 { device-name "ukbd0"; - action "kbdcontrol -k /dev/kbd0 < /dev/console"; + action "(kbdcontrol -i < /dev/ttyv0 | grep kbdmux) > /dev/null 2>&1 || (kbdcontrol -k /dev/kbd0 < /dev/ttyv0)"; }; # The entry below starts moused when a mouse is plugged in. Moused