linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: janusz borowski <bor@fuw.edu.pl>
To: linux-hotplug@vger.kernel.org
Subject: Re: ENV{MODALIAS}=="?*"->ONLY modprobe????,how to trap kernel events
Date: Fri, 17 Feb 2006 09:12:19 +0000	[thread overview]
Message-ID: <dt43ho$rmu$1@sea.gmane.org> (raw)
In-Reply-To: <dt1u8p$ltl$1@sea.gmane.org>

Greg KH wrote:

> Is /usr/local/lib/udev mounted at this time?
> 
> thanks,
> 
> greg k-h
> 
> 
Thanks for your remark.
Yes, it is mounted (/usr/local/lib/udev is a part of the partition
where the whole debian was installed and my rule starts working after 
booting).

I have tried much more rough test (because I thought that in this moment
the writing to disk is not starting yet).
I have changed RUN+=... to:
RUN+="/bin/sh -c 'K=%k; K=$$; printf $${K} '"
(and this line was taken and carefully changed from the "original 
working rule"
- at this moment I knew that is not so easy with udev....).
Nothing (and original rule in my computer loads about 15 modules,
like pci-bttv, snd *1394,...so should be more than 15 "printf's").
Next I have changed to:
RUN+="/bin/sh -c 'K=%k; printf YYYYYaaaaaa'" (easy seen string)
Nothing.

(At this time I did not believe in syslog, which should log everything,
so I have added in 3 scripts in /etc/init.d:
/sbin/lsmod
echo "name of script"
read bleble
Now, the boot process was stopping 3 times, and very easy I could read
all messages using Shift PgUp.
I am sure that my rule did not give any messages to console).

The only succeses in my "investigations" were as follows:
I have looked at /sys for ID connected with modules loaded by original rule
(not so clear for me but possible)
I have applied rules:
ID="something", OPTIONS+="last_rule".
Success - udev did not load any modules (so udev see all pci-events!!; 
eg. bttv).
But when I try:
ID="something",RUN+="a test", OPTIONS+="last_rule"
the polite udev ignores any test (>>file, printf, echo, ...).

I have tried:
RUN <-> PROGRAM
test rules on the beginning of rules list, on the end, near original 
(z55) - z52, z57
changing original rule or adding new
NOTHING         -   udev keep his secrets .....

Maybe I try to catch too much events?
Maybe it was possible to divide "trap procedure" into parts (but I do 
not know
the names of all events (eg. SUBSYTEM's) and I do not know  which set of 
rules
could give full information).

Maybe my problems are caused by "some time-like" effects?

Maybe someone has a source of "a test demon", which could be started
before udev and catch everything in his large buffer a
nd when the system is started it could save this buffer to a file ?

Thanks in advance
janusz









> -------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
> for problems?  Stop!  Download the new AJAX search engine that makes
> searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid\x103432&bid#0486&dat\x121642



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid\x103432&bid#0486&dat\x121642
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

      parent reply	other threads:[~2006-02-17  9:12 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-16 13:29 ENV{MODALIAS}=="?*"->ONLY modprobe????,how to trap kernel events janusz borowski
2006-02-17  3:40 ` ENV{MODALIAS}=="?*"->ONLY modprobe????,how to trap kernel events during boot Greg KH
2006-02-17  9:12 ` janusz borowski [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='dt43ho$rmu$1@sea.gmane.org' \
    --to=bor@fuw.edu.pl \
    --cc=linux-hotplug@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).