From mboxrd@z Thu Jan 1 00:00:00 1970 From: Greg KH Date: Thu, 23 Mar 2006 05:13:40 +0000 Subject: Re: RFC: InfiniBand hotplug agent Message-Id: <20060323051340.GA3121@kroah.com> 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 Wed, Mar 22, 2006 at 12:36:44PM -0800, Roland Dreier wrote: > Hmm, that's a problem, and indeed if I let the driver be loaded on > boot, I end up with "(none)" as the hostname (I usually blacklist my > IB drivers, because I do a lot of driver development and it's a pain > when the system crashes on boot because of bugs I wrote). > > Do you think using /etc/hostname instead (on Debian at least) is a > palatable solution? It seems this will end up being distro specific > unfortunately... Here's what I just tested (along with your > ACTION="add" suggestion), and it worked well even when the driver is > loaded at boot time: /etc is not even around at early boot time (think module loading from initramfs/initrd), which is what the "enterprise" distros do. > #!/bin/sh -e > > DESC_PATH="/sys/$DEVPATH/node_desc" > > [ -e "$DESC_PATH" ] || exit 0 > > read OLD_DESC < $DESC_PATH > read HOSTNAME < /etc/hostname > echo -n "$HOSTNAME ($OLD_DESC)" > $DESC_PATH Why does your drivers care about the hostname? The kernel already knows this information anyway... thanks, greg k-h ------------------------------------------------------- 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