From: greg@kroah.com (Greg KH)
To: kernelnewbies@lists.kernelnewbies.org
Subject: udev rule, when RUN script is invoked?
Date: Thu, 22 Feb 2018 08:56:01 +0100 [thread overview]
Message-ID: <20180222075601.GA5687@kroah.com> (raw)
In-Reply-To: <1519256204.385449.1279027064.006B2BE4@webmail.messagingengine.com>
On Wed, Feb 21, 2018 at 03:36:44PM -0800, Alexander Ivanov wrote:
> Hi All,
>
> I have udev rule defined on a
>
> DEVPATH="/dev/mydev0",..., ACTION="remove", ..., RUN+="/path/to/script"
>
> When does /path/to/script is executed in respect to module's remove() and exit() ?
A module's lifecycle is different from a device's lifecycle, right?
There is no remove() call for a module, only for a driver subsystem, so
be careful as to what exactly you are referring to here.
Hopefully, all devices "owned" by the module should be removed from the
kernel before the module is unloaded, so that should help you out here.
Also note that modules are never automatically unloaded, so that is
never a normal operation in the system.
what exactly are you trying to do here with your udev script?
thanks,
greg k-h
next prev parent reply other threads:[~2018-02-22 7:56 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-21 23:36 udev rule, when RUN script is invoked? Alexander Ivanov
2018-02-22 7:56 ` Greg KH [this message]
2018-02-22 16:44 ` Alexander Ivanov
2018-02-22 17:05 ` Greg KH
2018-02-22 17:35 ` Alexander Ivanov
2018-02-23 7:50 ` Greg KH
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=20180222075601.GA5687@kroah.com \
--to=greg@kroah.com \
--cc=kernelnewbies@lists.kernelnewbies.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).