aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorMichal Marek <mmarek@suse.cz>2010-01-27 03:46:23 -0500
committerMichal Marek <mmarek@suse.cz>2010-02-02 08:33:56 -0500
commitd4987bd7ae8401bd88896a6f76dc7af31fe55732 (patch)
treeb34dcdc8e13b62c1e48ab18832ad3ed96a6f2d9f /scripts
parente66f25d7d1be19e177cf55126a40799757efae89 (diff)
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>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/mkcompile_h5
1 files changed, 2 insertions, 3 deletions
diff --git a/scripts/mkcompile_h b/scripts/mkcompile_h
index 23dbad80cce..50ad317a4bf 100755
--- a/scripts/mkcompile_h
+++ b/scripts/mkcompile_h
@@ -67,9 +67,8 @@ UTS_TRUNCATE="cut -b -$UTS_LEN"
67 echo \#define LINUX_COMPILE_BY \"`whoami`\" 67 echo \#define LINUX_COMPILE_BY \"`whoami`\"
68 echo \#define LINUX_COMPILE_HOST \"`hostname | $UTS_TRUNCATE`\" 68 echo \#define LINUX_COMPILE_HOST \"`hostname | $UTS_TRUNCATE`\"
69 69
70 if [ -x /bin/dnsdomainname ]; then 70 domain=`dnsdomainname 2> /dev/null`
71 domain=`dnsdomainname 2> /dev/null` 71 if [ -z "$domain" ]; then
72 elif [ -x /bin/domainname ]; then
73 domain=`domainname 2> /dev/null` 72 domain=`domainname 2> /dev/null`
74 fi 73 fi
75 74