提交 d4987bd7 编写于 作者: M 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: NGlenn Sommer <glemsom@gmail.com>
Acked-by: NWANG Cong <xiyou.wangcong@gmail.com>
Tested-by: NGlenn Sommer <glemsom@gmail.com>
Signed-off-by: NMichal Marek <mmarek@suse.cz>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册