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.

2 Answers 2

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.

0

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

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.