From: Dorian Cantzen <cantzen@googlemail.com>
To: linux-hotplug@vger.kernel.org
Subject: Get name of newly added interface in udev/rules to pass it as a parameter to a shell script
Date: Mon, 24 Apr 2023 16:56:54 +0000 [thread overview]
Message-ID: <aed6b278-59ca-1dae-bfbf-f5bb9ce83af0@googlemail.com> (raw)
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
reply other threads:[~2023-04-24 16:56 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aed6b278-59ca-1dae-bfbf-f5bb9ce83af0@googlemail.com \
--to=cantzen@googlemail.com \
--cc=linux-hotplug@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).