[PATCH] kbdmux(4) and devd(8)

From: Maksim Yevmenkin <maksim.yevmenkin_at_savvis.net>
Date: Wed, 01 Mar 2006 15:27:35 -0800
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
_at__at_ -99,11 +99,11 _at__at_
  # 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
Received on Wed Mar 01 2006 - 22:27:41 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:52 UTC