[Cialug] udev help

Chris Freeman cwfreeman at gmail.com
Sun Dec 26 10:56:44 CST 2010


I'm trying to write a udev rule to hook up my Christmas present to my
computer.

The /dev/legonxt symlink (see rule) is never created, and the
/tmp/legonxt.called file (see script) is never created.

Any ideas?

----- details ------

udevadm info tells me this:
$ udevadm info -a -p /sys/devices/LNXSYSTM\:00/
<cut some plain text...>

  looking at device '/devices/LNXSYSTM:00':
    KERNEL=="LNXSYSTM:00"
    SUBSYSTEM=="acpi"
    DRIVER==""
    ATTR{path}=="\"
    ATTR{hid}=="LNXSYSTM"
    ATTR{modalias}=="acpi:LNXSYSTM:"


I've got this in /etc/udev/rules.d/90-legonxt.rules:
SUBSYSTEM=="acpi", ATTR{hid}=="LNXSYSTM", SYMLINK+=”legonxt”, ACTION=="add",
RUN+=”/etc/udev/legonxt.sh”

The shell file:

$ ls -l /etc/udev/legonxt.sh
-rwxr-xr-x 1 root root 327 2010-12-26 10:35 /etc/udev/legonxt.sh

$ cat /etc/udev/legonxt.sh
#!/bin/bash

echo "Called legonxt.sh ..." >> /tmp/legonxt.called
echo "  ACTION=[${ACTION}]" >> /tmp/legonxt.called
echo "  DEVICE=[${DEVICE}]" >> /tmp/legonxt.called

GROUP=plugdev
if [ "${ACTION}" = "add" ] &amp;&amp; [ -f "${DEVICE}" ]
then
 chmod o-rwx "${DEVICE}"
 chgrp "${GROUP}" "${DEVICE}"
 chmod g+rw "${DEVICE}"
fi



Thanks,

Chris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://cialug.org/pipermail/cialug/attachments/20101226/91e4a17b/attachment.htm 


More information about the Cialug mailing list