4

Is there anything equivalent to Debians udev rules on FreeBSD? I was hoping to set the name on devices according to the devices attributes such as PCI bus/MAC etc.

However, FreeBSD only seems to allow you rename the device after it's already set the device name. i.e. after the card is detected at boot and depending on the order, assigning names such as em0, em1 ...

I know that configuring rc.local should allow you to rename the interface but I prefer naming a device by it's attribute rather device name. e.g ifconfig_em0_name=eth0.

0

I've put together a script to provide MAC-based naming, which should do what you want: https://github.com/eborisch/ethname

3

The closest thing to a direct answer to your question would be to look at devd.conf, but if you just want to rename the interface, adding

ifconfig_em0_name="eth0"

to your rc.conf should do the trick. But this is probably just going to make it harder for other FreeBSD users to help you.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.