From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kay Sievers Date: Tue, 27 Feb 2007 12:47:27 +0000 Subject: Re: PATCH : new key MODEFILE Message-Id: <1172580448.3684.35.camel@min.off.vrfy.org> List-Id: References: <20070224023614.GA28903@bougret.hpl.hp.com> In-Reply-To: <20070224023614.GA28903@bougret.hpl.hp.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: linux-hotplug@vger.kernel.org On Mon, 2007-02-26 at 09:42 -0800, Jean Tourrilhes wrote: > On Sat, Feb 24, 2007 at 03:34:34PM +0100, Kay Sievers wrote: > > On 2/24/07, Jean Tourrilhes 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... > 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=3D"sdc1", MODEMASK{/mnt/media}=3D"0100", RUN=3D"mount /dev/%k /mnt= /media" > ------------------------------------------ Hmm, this should also work, and give you all the usual shell magic: RUN+=3D"/bin/sh -c 'test -r /mnt/media && mount $root/%k /mnt/media'" I doubt that optimizing not to spawn sh is really noticeable. > You could also do : > ------------------------------------------ > KERNEL=3D"sdb", MODEMASK{sda}=3D"0001", MODEMASK{sda}=3D"0002", MODE=3D"0= 666" > ------------------------------------------ The node usually doesn't exist at this time. :) Thanks, Kay ------------------------------------------------------------------------- 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=3Djoin.php&p=3Dsourceforge&CID=DEVD= EV _______________________________________________ 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