I'm using a buildroot-built Linux image with busybox, and mdev used to manage insertion and removal of USB devices.
As a test, I tried adding the following line to my /etc/mdev.conf
file:
sd([a-z])([0-9]+) root:root 660 =drive%1%2
As far as I understand, the %1
and %2
ought to capture the parenthesized tokens matched from the regular expression and substitute those in. However this isn't what happens.
However, when I insert a USB storage device, I instead get a file literally named /dev/drive%1%2
appearing among my devices, instead of say, /dev/drivea1
.
What am I doing wrong, and could this have something to do with how Buildroot does the busybox configuration?