mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Américo Wang" <xiyou.wangcong@gmail.com>
To: Glenn Sommer <glemsom@gmail.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Use full path to dnsdomainname and domainname in  scripts/mkcompile_h
Date: Wed, 20 Jan 2010 11:26:51 +0800	[thread overview]
Message-ID: <2375c9f91001191926hc80dc50mb264f757295c1337@mail.gmail.com> (raw)
In-Reply-To: <d65b1b151001191029o66794c24t228177a8ca544e44@mail.gmail.com>

On Wed, Jan 20, 2010 at 2:29 AM, Glenn Sommer <glemsom@gmail.com> wrote:
> With reference to: http://bugzilla.kernel.org/show_bug.cgi?id=14920
> I'll post my suggestion here.
>
> Currently scripts/mkcompile_h checks for "/bin/dnsdomainname" and
> "/bin/domainname" when trying to find the DNS name.
> Though, when running the executable - the full path isn't used!
>
> IMO if we check for "/bin/dnsdomainname", we should also use
> "/bin/dnsdomainname" - and not blindly trust /bin is the first directory in
> $PATH  which contains a executable named "dnsdomainname"
>
>
> I propose to use the full path, that we know is valid. Here's my proposed patch:
>
>
> --- scripts/mkcompile_h.orig    2009-12-28 23:02:34.000000000 +0100
> +++ scripts/mkcompile_h 2009-12-28 23:03:12.000000000 +0100
> @@ -66,9 +66,9 @@
>   echo \#define LINUX_COMPILE_HOST \"`hostname | $UTS_TRUNCATE`\"
>
>   if [ -x /bin/dnsdomainname ]; then
> -    echo \#define LINUX_COMPILE_DOMAIN \"`dnsdomainname | $UTS_TRUNCATE`\"
> +    echo \#define LINUX_COMPILE_DOMAIN \"`/bin/dnsdomainname | $UTS_TRUNCATE`\"
>   elif [ -x /bin/domainname ]; then
> -    echo \#define LINUX_COMPILE_DOMAIN \"`domainname | $UTS_TRUNCATE`\"
> +    echo \#define LINUX_COMPILE_DOMAIN \"`/bin/domainname | $UTS_TRUNCATE`\"
>   else
>     echo \#define LINUX_COMPILE_DOMAIN
>   fi
>
>
> Signed-off-by: Glenn Sommer <glemsom@gmail.com>

Makes sense, but is that possible we have 'domainname' installed in two
different directories?

  reply	other threads:[~2010-01-20  3:26 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-19 18:29 Glenn Sommer
2010-01-20  3:26 ` Américo Wang [this message]
2010-01-20 15:06   ` Glenn Sommer
2010-01-26  3:55     ` Américo Wang
2010-01-26 15:03       ` Michal Marek
2010-01-26 19:10         ` Glenn Sommer
2010-01-27  2:44           ` Américo Wang
2010-01-27  8:52             ` Michal Marek
2010-01-27  9:34               ` Américo Wang
     [not found]               ` <d65b1b151001270212q737706f1md00953155135b271@mail.gmail.com>
2010-01-27 10:14                 ` Glenn Sommer
2010-01-27 13:15                   ` Michal Marek

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=2375c9f91001191926hc80dc50mb264f757295c1337@mail.gmail.com \
    --to=xiyou.wangcong@gmail.com \
    --cc=glemsom@gmail.com \
    --cc=linux-kernel@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

all inboxes | Powered by JetHome®