Possible change to /etc/mdev.conf default?
Michael Conrad
mconrad at intellitree.com
Mon May 14 06:10:37 UTC 2012
On 05/14/2012 01:45 AM, Walter Dnes wrote:
> On Sun, May 13, 2012 at 05:47:15PM -0600, Michael J. Hammel wrote
>> On Sun, 2012-05-13 at 18:14 -0400, Walter Dnes wrote:
>>> I was spelunking through my /etc/mdev.conf, looking at the syntax,
>>> when something occured to me looking at...
>>>
>>> sr[0-9]* root:cdrom 660 @ln -sf $MDEV cdrom
>>>
>>> What happens if you have multiple devices, e.g. "sr0" and "sr1"? Does
>>> the system get confused? Would the following work better...
>>>
>>> sr[0-9]* root:cdrom 660 @ln -sf $MDEV cdrom%1
>> I don't think mdev handles that syntax but it would be trivial to
>> replace the ln command with a script that simply parses the number
>> (sr<num>) from MDEV and performs the same function as you suggest.
> Out of sheer curiousity, what do %1 and %2 do as shown on
> http://git.busybox.net/busybox/plain/docs/mdev.txt which seems to be
> somewhat different from the default /etc/mdev.conf on my machine.
>
FEATURE_MDEV_RENAME_REGEXP
mdev *does* do what you want. Notice that you need parentheses (like in the example) for regex capturing. (and the feature needs to be enabled of course)
-Mike
More information about the busybox
mailing list