An example mdev.conf

Natanael Copa natanael.copa at gmail.com
Fri Nov 6 13:43:25 UTC 2009


On Thu, 2009-11-05 at 15:11 -0600, Rob Landley wrote:
> On Thursday 05 November 2009 11:19:31 Natanael Copa wrote:
...
> ># null does already exist; therefore ownership has to be changed with
> > command null	root:root 0666	@chmod 666 $MDEV
> >zero	root:root 0666
> 
> Should mdev grow a more graceful way to do that?

I dont know.

...

> >zero	root:root 0666
> 
> 0:0 is smaller than root:root, and won't change.

yes. root is slightly more readable for someone who dont know what
mdev.conf is.

...

> By the way, what actually needs the vc/0 crud, anyway?  Didn't devfs names die 
> with devfs?

I dont know.

...
> And while I'm at it, the symlink syntax solar and LFS are using doesn't match 
> what mdev.txt documents.  I wonder if they're patching mdev?

I don't know.

> 
> >tty		root:tty 0666
> >tty[0-9]	root:root 0600
> >tty[0-9][0-9]	root:tty 0660
> 
> Presumably tty[0-9]* would handle all of those cases?
> 
> Why is the middle of the three different than the first and last?

Not sure really. dont know where it came from.

...
> ># alsa sound devices and audio stuff
> >pcm.*		root:audio 0660	=snd/
> >control.*	root:audio 0660	=snd/
> >midi.*		root:audio 0660	=snd/
> >seq		root:audio 0660	=snd/
> >timer		root:audio 0660	=snd/
> 
> Isn't there some kind of curly bracket syntax we can feed to these regexes to 
> group essentially identical lines like this?  (This is actually a regex 
> question, not an mdev question.)

Probably soemthing like:
(pcm.*)|(contro.*)|... 

but i think its easier to read the above.

> Who created the "snd" directory, anyway?  (Your init scripts before calling 
> mdev?)

I think mdev creates them. None of my scripts does afaik.

...

> ># raid controllers
> >cciss!(.*)	root:disk 0660 =cciss/%1
> >ida!(.*)	root:disk 0660 =ida/%1
> >rd!(.*)		root:disk 0660 =rd/%1
> 
> Quite a long config file.

Yeah i wonder if I could have done something like:
(.*)!(.*)	root:disk 0660 =%1/%2

But i dont know if there are other deivces using !


> >sr[0-9]		root:cdrom 0660 @ln -sf $MDEV cdrom
> 
> Um, why don't the = and > options work here?

I think because some early script reated a cdrom symlink which made
things go bad at some point.

> (And when we _unplug_ devices, do those symlinks get properly removed?  Or the 
> moved device nodes?)

i thought they was, but havent tested.

Thanks for your comments.

-nc



More information about the busybox mailing list