Commit 9c3049c0 authored by Felipe Contreras's avatar Felipe Contreras Committed by Sam Ravnborg

kbuild: fix warning when domainname is not available

Otherwise we get:
"dnsdomainname: Unknown host"
Signed-off-by: default avatarFelipe Contreras <felipe.contreras@gmail.com>
Acked-by: default avatarWANG Cong <xiyou.wangcong@gmail.com>
Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
parent 58242b2b
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment