From mboxrd@z Thu Jan 1 00:00:00 1970 From: md@Linux.IT (Marco d'Itri) Date: Wed, 22 Mar 2006 19:47:48 +0000 Subject: Re: RFC: InfiniBand hotplug agent Message-Id: <20060322194748.GA11229@wonderland.linux.it> List-Id: References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org On Mar 22, Roland Dreier 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&kid0944&bid$1720&dat1642 _______________________________________________ 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