From: md@Linux.IT (Marco d'Itri)
To: linux-hotplug@vger.kernel.org
Subject: Re: RFC: InfiniBand hotplug agent
Date: Wed, 22 Mar 2006 19:47:48 +0000 [thread overview]
Message-ID: <20060322194748.GA11229@wonderland.linux.it> (raw)
In-Reply-To: <ada1wwu47xf.fsf@cisco.com>
On Mar 22, Roland Dreier <rdreier@cisco.com> wrote:
> - What's the right way to get this into distributions? File wishlist
> bugs against udev with the rule and the script included?
Yes.
> cd /lib/udev/
> . ./hotplug.functions
I think that this is debian-specific, and you are not using it anyway.
> if [ "$ACTION" = "add" ]; then
Remove this if statement and use such a rule instead:
ACTION="add", SUBSYSTEM="infiniband", RUN+="infiniband.agent"
#!/bin/sh -e
DESC_PATH="/sys/$DEVPATH/node_desc"
# is this actually needed? can node_desc really not exist?
[ -e "$DESC_PATH" ] || exit 0
# by using read instead of cat you save a fork+exec
read OLD_DESC < $DESC_PATH
DESC="`hostname` ($OLD_DESC)"
echo -n $DESC > $DESC_PATH
But probably using hostname(1) in a RUN rule is not such a great idea,
because at boot time the script will be run long before the system
hostname will have been set by an init script.
--
ciao,
Marco
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid\x110944&bid$1720&dat\x121642
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
next prev parent reply other threads:[~2006-03-22 19:47 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-22 19:05 RFC: InfiniBand hotplug agent Roland Dreier
2006-03-22 19:47 ` Marco d'Itri [this message]
2006-03-22 20:36 ` Roland Dreier
2006-03-23 5:13 ` Greg KH
2006-03-23 15:19 ` Scott James Remnant
2006-03-23 17:11 ` Roland Dreier
2006-03-23 23:31 ` Greg KH
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=20060322194748.GA11229@wonderland.linux.it \
--to=md@linux.it \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.