From: Greg KH <greg@kroah.com>
To: linux-hotplug@vger.kernel.org
Subject: Re: RFC: InfiniBand hotplug agent
Date: Thu, 23 Mar 2006 05:13:40 +0000 [thread overview]
Message-ID: <20060323051340.GA3121@kroah.com> (raw)
In-Reply-To: <ada1wwu47xf.fsf@cisco.com>
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&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-23 5:13 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
2006-03-22 20:36 ` Roland Dreier
2006-03-23 5:13 ` Greg KH [this message]
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=20060323051340.GA3121@kroah.com \
--to=greg@kroah.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 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.