Get name of newly added interface in udev/rules to pass it as a parameter to a shell script
Dorian Cantzen <[email protected]> Mon, 24 Apr 2023 16:56:54 +0000
| Newsgroups | org.kernel.vger.linux-hotplug |
|---|---|
| Message-ID | <[email protected]> |
Hey I'm a bit desperate. I'm trying to get some help writing a
udev/rule. My problem I also posted on UNIX.stackexchange.com
https://unix.stackexchange.com/questions/743890/get-name-of-newly-added-interface-in-udev-rules-to-pass-it-as-a-parameter-to-a-s
Basically I'm trying to get the name of the interface of a newly added
usb lte stick which I tried with:
SUBSYSTEM="net" ACTION="add" ATTRS{idVendor}="12d1"
RUN+="/home/some/interface_test/dosomething.sh '$attr{bInterfaceClass}'"
But there is nothing being passed over. I also tried it with the %m %b
listed in the man pages but not the right information is being passed.
Cheers
Dorian