From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jean Tourrilhes Date: Tue, 27 Feb 2007 17:19:37 +0000 Subject: Re: PATCH : new key MODEFILE Message-Id: <20070227171937.GA3062@bougret.hpl.hp.com> 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, 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 /m= nt/media" > > ------------------------------------------ >=20 > 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. During boot time, it's death by the thousands cuts. Spawning a shell on my box is 4ms. ------------------------------------------- # time 'test -r /mnt/media' -su: test -r /mnt/media: No such file or directory real 0m0.004s user 0m0.004s sys 0m0.000s ------------------------------------------- > > 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. :) Check again the rule, it's more subtle than that. > Thanks, > Kay 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=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