From 7858ef1fcda14c41001f8799118c950622b82057 Mon Sep 17 00:00:00 2001 From: Ian Gulliver Date: Sun, 21 Apr 2019 17:33:23 +0000 Subject: [PATCH] udev is your friend --- 2006-03-02-udev-is-your-friend.html | 17 +++++++++++++++++ index.html | 1 + markdown/2006-03-02-udev-is-your-friend.md | 16 ++++++++++++++++ markdown/index.md | 1 + 4 files changed, 35 insertions(+) create mode 100644 2006-03-02-udev-is-your-friend.html create mode 100644 markdown/2006-03-02-udev-is-your-friend.md diff --git a/2006-03-02-udev-is-your-friend.html b/2006-03-02-udev-is-your-friend.html new file mode 100644 index 0000000..73e8448 --- /dev/null +++ b/2006-03-02-udev-is-your-friend.html @@ -0,0 +1,17 @@ + + + + + +

Well, not completely. Most of us have had a udev install eat /dev and make the machine unbootable at least once. However, when it works, it’s really neat.

+ +

We have cash register machines at CORESense with two touchscreens attached; one facing the cashier and one facing the customer (they work as kiosks when they’re not in use for checkout). The problem is that the touchscreen inputs are USB event interfaces which are sequentially numbered, and the startup order isn’t always the same. This means that you can’t give X a device name, because it changes every bootup. Enter udev.

+ +

I put this in /etc/udev/rules.d/coresense.rules:

+ +
KERNEL==”event[0-9]*”, SYSFS{name}==”Elo *”, NAME=”coresense/elo-$sysfs{uniq}”
+
+ +

This matches event interface devices with the given name pattern, and creates device nodes in /dev/coresense with the device serial number in the device name. Poof - repeatable names.

+ + diff --git a/index.html b/index.html index bc92686..4006dc6 100644 --- a/index.html +++ b/index.html @@ -40,6 +40,7 @@
  • 2009-Sep-11: Confusing BIND with CNAMEs
  • 2009-Feb-19: The odd case of my mugging
  • 2009-Feb-03: 5-packet TCP connection?
  • +
  • 2006-Mar-02: udev is your friend
  • 2006-Mar-02: Why is my directory empty and large?
  • 2006-Feb-26: Why isn’t mod_auth_pam working with NIS?
  • 2006-Feb-26: SCTP Part #1
  • diff --git a/markdown/2006-03-02-udev-is-your-friend.md b/markdown/2006-03-02-udev-is-your-friend.md new file mode 100644 index 0000000..13394d7 --- /dev/null +++ b/markdown/2006-03-02-udev-is-your-friend.md @@ -0,0 +1,16 @@ + + + + + +Well, not completely. Most of us have had a udev install eat /dev and make the machine unbootable at least once. However, when it works, it’s really neat. + +We have cash register machines at CORESense with two touchscreens attached; one facing the cashier and one facing the customer (they work as kiosks when they’re not in use for checkout). The problem is that the touchscreen inputs are USB event interfaces which are sequentially numbered, and the startup order isn’t always the same. This means that you can’t give X a device name, because it changes every bootup. Enter udev. + +I put this in /etc/udev/rules.d/coresense.rules: + + KERNEL==”event[0-9]*”, SYSFS{name}==”Elo *”, NAME=”coresense/elo-$sysfs{uniq}” + +This matches event interface devices with the given name pattern, and creates device nodes in /dev/coresense with the device serial number in the device name. Poof - repeatable names. + + diff --git a/markdown/index.md b/markdown/index.md index bbf9730..eca355e 100644 --- a/markdown/index.md +++ b/markdown/index.md @@ -39,6 +39,7 @@ 1. 2009-Sep-11: [Confusing BIND with CNAMEs](2009-09-11-confusing-bind-with-cnames.html) 1. 2009-Feb-19: [The odd case of my mugging](2019-02-19-the-odd-case-of-my-mugging.html) 1. 2009-Feb-03: [5-packet TCP connection?](2009-02-03-5-packet-tcp-connection.html) +1. 2006-Mar-02: [udev is your friend](2006-03-02-udev-is-your-friend.html) 1. 2006-Mar-02: [Why is my directory empty and large?](2006-03-02-why-is-my-directory-empty-and-large.html) 1. 2006-Feb-26: [Why isn’t mod\_auth\_pam working with NIS?](2006-02-26-why-isnt-mod_auth_pam-working-with-nis.html) 1. 2006-Feb-26: [SCTP Part #1](2006-02-26-sctp-part-1.html)