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: Glenn Sommer <glemsom@gmail.com> Acked-by: WANG Cong <xiyou.wangcong@gmail.com> Tested-by: Glenn Sommer <glemsom@gmail.com> Signed-off-by: Michal Marek <mmarek@suse.cz>
This commit is contained in:
parent
e66f25d7d1
commit
d4987bd7ae
1 changed files with 2 additions and 3 deletions
|
@ -67,9 +67,8 @@ UTS_TRUNCATE="cut -b -$UTS_LEN"
|
||||||
echo \#define LINUX_COMPILE_BY \"`whoami`\"
|
echo \#define LINUX_COMPILE_BY \"`whoami`\"
|
||||||
echo \#define LINUX_COMPILE_HOST \"`hostname | $UTS_TRUNCATE`\"
|
echo \#define LINUX_COMPILE_HOST \"`hostname | $UTS_TRUNCATE`\"
|
||||||
|
|
||||||
if [ -x /bin/dnsdomainname ]; then
|
domain=`dnsdomainname 2> /dev/null`
|
||||||
domain=`dnsdomainname 2> /dev/null`
|
if [ -z "$domain" ]; then
|
||||||
elif [ -x /bin/domainname ]; then
|
|
||||||
domain=`domainname 2> /dev/null`
|
domain=`domainname 2> /dev/null`
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue