M
M
Macbet2016-04-06 11:28:08
linux
Macbet, 2016-04-06 11:28:08

How to assign a static name to /dev device?

Hello, there are gsm modems that send messages to users every time the equipment is rebooted, the name of the gsm modem in / dev changes, please tell me how to fix their names so that they do not change upon reboot?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
Nikita Chukov, 2016-04-06
@chukov

I think it's worth looking into udev rules
. Here's an example of renaming a network interface:
vi /etc/udev/rules.d/70-persistent-net.rules

SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="b8:ac:6f:65:31:e5", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="wan0"

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question