mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 03:36:19 +00:00
kbuild: fix warning when domainname is not available
Otherwise we get: "dnsdomainname: Unknown host" Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Acked-by: WANG Cong <xiyou.wangcong@gmail.com> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
This commit is contained in:
parent
58242b2b06
commit
9c3049c02c
1 changed files with 6 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue