Re: [PATCH v2 2/6] kbuild: fix warning when domainname is not available
From: AmÃrico Wang
Date: Wed Sep 16 2009 - 22:12:15 EST
On Thu, Sep 17, 2009 at 5:38 AM, Felipe Contreras
<felipe.contreras@xxxxxxxxx> wrote:
> Otherwise we get:
> "dnsdomainname: Unknown host"
>
> Signed-off-by: Felipe Contreras <felipe.contreras@xxxxxxxxx>
Acked-by: WANG Cong <xiyou.wangcong@xxxxxxxxx>
> ---
> Âscripts/mkcompile_h | Â Â8 ++++++--
> Â1 files changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/scripts/mkcompile_h b/scripts/mkcompile_h
> index 6a12dd9..f060763 100755
> --- a/scripts/mkcompile_h
> +++ b/scripts/mkcompile_h
> @@ -66,9 +66,13 @@ UTS_TRUNCATE="sed -e s/\(.\{1,$UTS_LEN\}\).*/\1/"
> Â echo \#define LINUX_COMPILE_HOST \"`hostname | $UTS_TRUNCATE`\"
>
> Â if [ -x /bin/dnsdomainname ]; then
> - Â Âecho \#define LINUX_COMPILE_DOMAIN \"`dnsdomainname | $UTS_TRUNCATE`\"
> + Â Âdomain=`dnsdomainname 2> /dev/null`
> Â elif [ -x /bin/domainname ]; then
> - Â Âecho \#define LINUX_COMPILE_DOMAIN \"`domainname | $UTS_TRUNCATE`\"
> + Â Âdomain=`domainname 2> /dev/null`
> + Âfi
> +
> + Âif [ -n "$domain" ]; then
> + Â Âecho \#define LINUX_COMPILE_DOMAIN \"`echo $domain | $UTS_TRUNCATE`\"
> Â else
> Â Â echo \#define LINUX_COMPILE_DOMAIN
> Â fi
> --
> 1.6.5.rc1
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at Âhttp://vger.kernel.org/majordomo-info.html
> Please read the FAQ at Âhttp://www.tux.org/lkml/
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/