All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Rajnoha <prajnoha@redhat.com>
To: lvm-devel@redhat.com
Subject: [PATCH] Utilize new IMPORT{db} udev rule to repopulate udev db for spurious events
Date: Fri, 23 Apr 2010 14:14:44 +0200	[thread overview]
Message-ID: <4BD18F34.10601@redhat.com> (raw)
In-Reply-To: <20100422233856.GC23791@agk-dp.fab.redhat.com>

On 04/23/2010 01:38 AM, Alasdair G Kergon wrote:
> On Tue, Apr 20, 2010 at 04:51:44PM +0200, Peter Rajnoha wrote:
>> @@ -44,6 +44,28 @@ ENV{DM_COOKIE}=="?*", IMPORT{program}="$env{DM_SBIN_PATH}/dmsetup udevflags $env
>   
>> +IMPORT{db}="DM_UDEV_DISABLE_DM_RULES_FLAG"
> 
> How does this cope if an older version of udev is installed?
> 
> Do we need to install/activate it conditionally?

Good question! We'll probably need to do something like that.
Looking precisely at udevd debug log:

 - it tries to fallback to "auto mode" if it can't recognize the type of IMPORT

 - it tries to stat the file with the name given as parameter, e.g.
   "DM_UDEV_DISABLE_DM_RULES_FLAG"

 - if it's not a valid path, it will put "/lib/udev/" as a prefix first, so we'll
   have "/lib/udev/disable/DM_UDEV_DISBALE_DM_RULES_FLAG"

 - if the file *really exists* by chance then:
     - it will try to execute it if it has executable flag set (fallback to IMPORT{program})
     - it will try to read the contents of it (fallback to IMPORT{file})

Hmm, this definitely needs to be taken care of...

Peter



      reply	other threads:[~2010-04-23 12:14 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-20 14:51 [PATCH] Utilize new IMPORT{db} udev rule to repopulate udev db for spurious events Peter Rajnoha
2010-04-20 14:56 ` Peter Rajnoha
2010-04-22 23:38 ` Alasdair G Kergon
2010-04-23 12:14   ` Peter Rajnoha [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=4BD18F34.10601@redhat.com \
    --to=prajnoha@redhat.com \
    --cc=lvm-devel@redhat.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.