[ltp] Re: A new udev rule gives me 3min startup delay

Daniel Castro linux-thinkpad@linux-thinkpad.org
Wed, 26 Aug 2009 17:24:54 +0100


--00032555bd06298f7404720de4fd
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

I would have thought that even just

KERNEL=3D=3D"dock.0", ACTION=3D=3Dchange, RUN+=3D"/etc/thinkpad/dock.sh"

should work as I'm reading using

DOCKED=3D$(cat /sys/devices/platform/dock.0/docked)

on that /etc/thinkpad/dock.sh script....

Not sure what's wrong.... I hope someone can shed some light...

~$ udevadm monitor --environment
monitor will print the received events for:
UDEV - the event which udev sends out after rule processing
KERNEL - the kernel uevent

KERNEL[1251303441.446118] change   /devices/platform/dock.0 (platform)
UDEV_LOG=3D3
ACTION=3Dchange
DEVPATH=3D/devices/platform/dock.0
SUBSYSTEM=3Dplatform
EVENT=3Dundock
MODALIAS=3Dplatform:dock
SEQNUM=3D4370


2009/8/26 Daniel Castro <castromd@tcd.ie>

>
> 2009/8/26 Bj=F8rn Mork <bjorn@mork.no>
>
>> Daniel Castro <castromd@tcd.ie> writes:
>>
>> > Do I need to change the contents of
>> /etc/udev/rules.d/80-thinkpad-T61.rules?
>> > To something like:
>> >
>> > KERNEL=3D=3D"dock.0", ATTR{docked}=3D=3D"1", ACTION=3D=3Dchange,
>> > RUN+=3D"/etc/thinkpad/dock.sh 1"
>> > KERNEL=3D=3D"dock.0", ATTR{docked}=3D=3D"0", ACTION=3D=3Dchange,
>> > RUN+=3D"/etc/thinkpad/dock.sh 0"
>>
>> Not that it matters much, but you can simplify this to a single rule:
>>
>>  KERNEL=3D=3D"dock.0", ACTION=3D=3Dchange, RUN+=3D"/etc/thinkpad/dock.sh
>> $attr{docked}"
>
> didn't work this way either...
>
>>
>>
>>
>>
>> Bj=F8rn
>> --
>> The linux-thinkpad mailing list home page is at:
>> http://mailman.linux-thinkpad.org/mailman/listinfo/linux-thinkpad
>>
>>
>
>
> --
> ________________________
>
> Daniel Castro, M.Sc.
> +353 083-318-2058
> dancasmo@gmail.com
> castromd@tcd.ie
> ________________________
>



--=20
________________________

Daniel Castro, M.Sc.
+353 083-318-2058
dancasmo@gmail.com
castromd@tcd.ie
________________________

--00032555bd06298f7404720de4fd
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

I would have thought that even just<br><br>KERNEL=3D=3D&quot;dock.0&quot;, =
ACTION=3D=3Dchange, RUN+=3D&quot;/etc/thinkpad/dock.sh&quot;<br><br>should =
work as I&#39;m reading using<br><br>DOCKED=3D$(cat /sys/devices/platform/d=
ock.0/docked)<br>
<br>on that /etc/thinkpad/dock.sh script....<br><br>Not sure what&#39;s wro=
ng.... I hope someone can shed some light...<br><br>~$ udevadm monitor --en=
vironment<br>monitor will print the received events for:<br>UDEV - the even=
t which udev sends out after rule processing<br>
KERNEL - the kernel uevent<br><br>KERNEL[1251303441.446118] change=A0=A0 /d=
evices/platform/dock.0 (platform)<br>UDEV_LOG=3D3<br>ACTION=3Dchange<br>DEV=
PATH=3D/devices/platform/dock.0<br>SUBSYSTEM=3Dplatform<br>EVENT=3Dundock<b=
r>MODALIAS=3Dplatform:dock<br>
SEQNUM=3D4370<br><br><br><div class=3D"gmail_quote">2009/8/26 Daniel Castro=
 <span dir=3D"ltr">&lt;<a href=3D"mailto:castromd@tcd.ie">castromd@tcd.ie</=
a>&gt;</span><br><blockquote class=3D"gmail_quote" style=3D"border-left: 1p=
x solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br><div class=3D"gmail_quote">2009/8/26 Bj=F8rn Mork <span dir=3D"ltr">&lt=
;<a href=3D"mailto:bjorn@mork.no" target=3D"_blank">bjorn@mork.no</a>&gt;</=
span><div class=3D"im"><br><blockquote class=3D"gmail_quote" style=3D"borde=
r-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-le=
ft: 1ex;">

<div>Daniel Castro &lt;<a href=3D"mailto:castromd@tcd.ie" target=3D"_blank"=
>castromd@tcd.ie</a>&gt; writes:<br>
<br>
&gt; Do I need to change the contents of /etc/udev/rules.d/80-thinkpad-T61.=
rules?<br>
&gt; To something like:<br>
&gt;<br>
&gt; KERNEL=3D=3D&quot;dock.0&quot;, ATTR{docked}=3D=3D&quot;1&quot;, ACTIO=
N=3D=3Dchange,<br>
&gt; RUN+=3D&quot;/etc/thinkpad/dock.sh 1&quot;<br>
&gt; KERNEL=3D=3D&quot;dock.0&quot;, ATTR{docked}=3D=3D&quot;0&quot;, ACTIO=
N=3D=3Dchange,<br>
&gt; RUN+=3D&quot;/etc/thinkpad/dock.sh 0&quot;<br>
<br>
</div>Not that it matters much, but you can simplify this to a single rule:=
<br>
<br>
=A0KERNEL=3D=3D&quot;dock.0&quot;, ACTION=3D=3Dchange, RUN+=3D&quot;/etc/th=
inkpad/dock.sh $attr{docked}&quot;</blockquote></div><div>didn&#39;t work t=
his way either... <br></div><div class=3D"im"><blockquote class=3D"gmail_qu=
ote" style=3D"border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0p=
t 0.8ex; padding-left: 1ex;">

<br>
<br>
<br>
<br>
Bj=F8rn<br>
<font color=3D"#888888">--<br>
The linux-thinkpad mailing list home page is at:<br>
<a href=3D"http://mailman.linux-thinkpad.org/mailman/listinfo/linux-thinkpa=
d" target=3D"_blank">http://mailman.linux-thinkpad.org/mailman/listinfo/lin=
ux-thinkpad</a><br>
<br>
</font></blockquote></div></div><br><br clear=3D"all"><div><div></div><div =
class=3D"h5"><br>-- <br>________________________<br><br>Daniel Castro, M.Sc=
.<br>+353 083-318-2058<br><a href=3D"mailto:dancasmo@gmail.com" target=3D"_=
blank">dancasmo@gmail.com</a><br>
<a href=3D"mailto:castromd@tcd.ie" target=3D"_blank">castromd@tcd.ie</a><br=
>
________________________<br>
</div></div></blockquote></div><br><br clear=3D"all"><br>-- <br>___________=
_____________<br><br>Daniel Castro, M.Sc.<br>+353 083-318-2058<br><a href=
=3D"mailto:dancasmo@gmail.com">dancasmo@gmail.com</a><br><a href=3D"mailto:=
castromd@tcd.ie">castromd@tcd.ie</a><br>
________________________<br>

--00032555bd06298f7404720de4fd--