"mdev: remove undocumented subsystem/devname matching hack" disaster.

Piotr Karbowski piotr.karbowski at gmail.com
Fri Jan 25 10:11:12 UTC 2013


Hi,

Along 1.21.0 release the mdev become pretty much unusable, the commit 
bf99807657eac6f0d4fc593b3a83d34338c62293 break some rules, for example 
alsa, the rules (the same as in current mdev_fat.conf):

	pcm.*		root:audio 660 =snd/
	control.*	root:audio 660 =snd/
	midi.*		root:audio 660 =snd/
	seq		root:audio 660 =snd/
	timer		root:audio 660 =snd/

And I am using this tiny snippet to coldplug automaticly all the 
modules: find /sys -name 'modalias' -type f -exec cat '{}' + | sort -u | 
xargs modprobe -b -a 2>/dev/null

After its done, the snd-hda-intel is loaded, but /dev/snd/control* etc 
have wrong permissions, root:root instead of root:audio, after I re-run 
'mdev -s' the permissions are fixed.

Next issue is removing support of rules like "-net/.*", now it does not 
execute script whenever new interface arrive, thus I need to either 
create hotplug-agent-wrapper script to check for SUBSYSTEM=net to run it 
and skip mdev or add rule like '.* root:root 660 
*/opt/mdev/helpers/catch-all' at the very end of mdev.conf

At this point mdev become less and less usable, I wonder if I don't know 
about any better solution or there is none.

-- Piotr.


More information about the busybox mailing list