From: Michal Marek Date: Wed, 27 Jan 2010 08:46:23 +0000 (+0100) Subject: scripts/mkcompile_h: don't test for hardcoded paths X-Git-Tag: v2.6.35-rc2~61^2~63 X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?p=pandora-kernel.git;a=commitdiff_plain;h=d4987bd7ae8401bd88896a6f76dc7af31fe55732 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 Acked-by: WANG Cong Tested-by: Glenn Sommer Signed-off-by: Michal Marek --- diff --git a/scripts/mkcompile_h b/scripts/mkcompile_h index 23dbad80cce9..50ad317a4bf9 100755 --- a/scripts/mkcompile_h +++ b/scripts/mkcompile_h @@ -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 + domain=`dnsdomainname 2> /dev/null` + if [ -z "$domain" ]; then domain=`domainname 2> /dev/null` fi