[PATCH] automount for mdev

Rob Landley rob at landley.net
Sat Aug 12 02:25:53 UTC 2006


On Friday 11 August 2006 10:49 am, Chris Steel wrote:
> I've been having problems with autofs possibly related to mdev, probably
> not. In the end I decided that it might be better to get rid of autofs all
> together and put the automounter in busybox. Attached is a patch to add
> automounting to mdev. It's probably possible to combine elements of this
> patch with the existing mdev code to make it a bit smaller, but for the time
> being I've just added code rather than changing what's already there. If
> this patch meets with approval I could look at removing duplicated code if
> required. 
> 
> Configuration is through /etc/auto.master and follows the same format as
> autofs. 
> 
> Any comments?

Seems reasonable, but behind the scenes you should know that yesterday Erik 
Andersen pointed me at a hotplug thing he ported to BusyBox:

> I'm not sure if anyone else needs or cares about an /sbin/hotplug
> utility, but I've hacked together one based on diethotplug 0.4
> which works quite nicely, and unlike diethotplug 0.4, does not
> need kernel sources since it directly reads and parses the
> various /lib/modules/KVER/*map files rather than compiling them
> into the hotplug binary.  This makes it much more flexible, much
> less annoying to compile, and makes it only slightly larger.  The
> applet is already busyboxed, in you think anyone else might find
> it sufficiently useful.  I've been using this for a few years now
> for handling things like usb and 1394 device hotplug,
>
> http://buildroot.uclibc.org/cgi-bin/viewcvs.cgi/trunk/buildroot/package/hot
>plug/diethotplug-0.5.tar?rev=15796&view=markup
>
>  -Erik

The problem is that Greg Kroah-Hartman's diethotplug (which Erik based his 
port on) is GPLv2 with no "or later", and BusyBox is GPLv2 "or later", so 
there's a minor license issue to work out there.  (And I have no idea 
whether "work out" here means get an "or later" from Greg, accept V2 only 
code into BusyBox and drop the "or later", rewrite the code...  For right now 
if we can get an "or later" from Greg we can bypass having to make an actual 
decision.  BusyBox is probably never going to be GPLv3 only, so there's a 
question of how useful the "or later" really is, but we've got it and it 
wouldn't be easy to get it back after dropping it, so...)

Anyway, this is three different things that the call to /sbin/hotplug might 
need to do, and I need to read up on all three and figure out the best way to 
glue all this together.

But first, I want to get the shared subtree and CIFS support for mount 
committed and happy.  (A patch for which _also_ got emailed to me off list, 
and I'm churning through with the author...)

Rob

P.S.  I've started writing a "BusyBox weekly news", starting with this past 
week and working backwards to fill out some history.  First few should go up 
this weekend...
-- 
Never bet against the cheap plastic solution.



More information about the busybox mailing list