Commit d4987bd7 authored by Michal Marek's avatar Michal Marek

scripts/mkcompile_h: don't test for hardcoded paths

Don't test for /bin/{dnsdomainname,domainname}, simply try to execute
the command and check if it returned something.
Reported-by: default avatarGlenn Sommer <glemsom@gmail.com>
Acked-by: default avatarWANG Cong <xiyou.wangcong@gmail.com>
Tested-by: default avatarGlenn Sommer <glemsom@gmail.com>
Signed-off-by: default avatarMichal Marek <mmarek@suse.cz>
parent e66f25d7
......@@ -67,9 +67,8 @@ UTS_TRUNCATE="cut -b -$UTS_LEN"
echo \#define LINUX_COMPILE_BY \"`whoami`\"
echo \#define LINUX_COMPILE_HOST \"`hostname | $UTS_TRUNCATE`\"
if [ -x /bin/dnsdomainname ]; then
domain=`dnsdomainname 2> /dev/null`
elif [ -x /bin/domainname ]; then
if [ -z "$domain" ]; then
domain=`domainname 2> /dev/null`
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