perf tools: Fix build error on read only source.
[sfrench/cifs-2.6.git] / scripts / mkcompile_h
index 23dbad80cce9e16ce885d61163a5f79c1ca2b981..50ad317a4bf9b41bc62d074ee8bd19a9864ffda6 100755 (executable)
@@ -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