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
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue