From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kay Sievers Date: Fri, 16 Mar 2007 00:55:40 +0000 Subject: Re: PATCH : new key MODEFILE Message-Id: <1174006540.25945.18.camel@lov.localdomain> 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 Tue, 2007-02-27 at 09:19 -0800, Jean Tourrilhes wrote: > On Tue, Feb 27, 2007 at 01:47:27PM +0100, Kay Sievers wrote: > > On Mon, 2007-02-26 at 09:42 -0800, Jean Tourrilhes wrote: > >=20 > > > 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" > > > ------------------------------------------ > > > You could also do : > > > ------------------------------------------ > > > KERNEL=3D"sdb", MODEMASK{sda}=3D"0001", MODEMASK{sda}=3D"0002", MODE= =3D"0666" > > > ------------------------------------------ > >=20 > > The node usually doesn't exist at this time. :) >=20 > Check again the rule, it's more subtle than that. We don't know, if sda is created before sdb. I don't think we should match on other device properties, that just asks for timing trouble, especially during coldplug where everything (that hasn't a parent-child relation) runs in parallel. How about a TEST{}=3D key that accepts the usual: e, f, d, r, w, x, or an octal bitmask? It would look like: TEST{r}=3D"/etc/foo" TEST{w}=3D"/tmp/foo" TEST{0002}=3D"/tmp/foo" I don't think, we should default to /dev, reading from there is nothing we want to encourage anybody to do. And I think a single key per rule would be fine for a start. 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