linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jean Tourrilhes <jt@hpl.hp.com>
To: linux-hotplug@vger.kernel.org
Subject: Re: PATCH : new key MODEFILE
Date: Mon, 26 Feb 2007 17:42:09 +0000	[thread overview]
Message-ID: <20070226174209.GA961@bougret.hpl.hp.com> (raw)
In-Reply-To: <20070224023614.GA28903@bougret.hpl.hp.com>

On Sat, Feb 24, 2007 at 03:34:34PM +0100, Kay Sievers wrote:
> On 2/24/07, Jean Tourrilhes <jt@hpl.hp.com> wrote:
> >        I was looking into using the key name RUN and PROGRAM in udev,
> >and I realised that udev attempt to run those programs even if they
> >don't exist. This is a bit wasteful timewise...
> 
> Well, having rules for non-existent programs seems like the "real
> waste", and I call it an configuration error. Care to explain the
> benefit of such rules and extension?
> 
> Thank,
> Kay

	Hi again,

	Sorry for the delay, my wife was keeping me busy over the week
end ;-)
	Thanks for your comments. I think you are only looking at it
from a strict udev perspective, while I'm looking at it from the other
end. I'll try to explain it a bit better...

	Obviously, you never want to put rules for non-existent
programs. However, life is usually messy, and it's difficult to
guarantee that the rules and the program stays in sync over the full
lifetime of a system. I usually clone my HDD and config files between
the various systems I manage. By accident, the user may have the rules
still exist and the program gone or moved.

	Then, I do shell programming, and in shell this type of
conditional construct is quite common. For example, check the
net.agent script in the udev package for the function
check_program(). If it's good practice over there, it's probably good
practice over here.

	But, if it was only for those two reasons, I would agree with
you that it's not a big deal. That's why I designed it so that it's as
generic as possible and can be used for many other things.
	For example, you can do :
------------------------------------------
KERNEL="sdc1", MODEMASK{/mnt/media}="0100", RUN="mount /dev/%k /mnt/media"
------------------------------------------
	You could also do :
------------------------------------------
KERNEL="sdb", MODEMASK{sda}="0001", MODEMASK{sda}="0002", MODE="0666"
------------------------------------------
	If you let your imagination wild, you'll probably find many
other use.

	Have fun...

	Jean

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CIDÞVDEV
_______________________________________________
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:[~2007-02-26 17:42 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-24  2:36 PATCH : new key MODEFILE Jean Tourrilhes
2007-02-24  4:48 ` Andrey Borzenkov
2007-02-24 14:34 ` Kay Sievers
2007-02-24 14:58 ` Marco d'Itri
2007-02-26 17:42 ` Jean Tourrilhes [this message]
2007-02-27 12:47 ` Kay Sievers
2007-02-27 17:19 ` Jean Tourrilhes
2007-03-16  0:55 ` Kay Sievers
2007-03-16  1:04 ` Jean Tourrilhes

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=20070226174209.GA961@bougret.hpl.hp.com \
    --to=jt@hpl.hp.com \
    --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).