Skip to content

Commit

Permalink
scripts/mkcompile_h: don't test for hardcoded paths
Browse files Browse the repository at this point in the history
Don't test for /bin/{dnsdomainname,domainname}, simply try to execute
the command and check if it returned something.

Reported-by: Glenn Sommer <[email protected]>
Acked-by: WANG Cong <[email protected]>
Tested-by: Glenn Sommer <[email protected]>
Signed-off-by: Michal Marek <[email protected]>
  • Loading branch information
michal42 committed Feb 2, 2010
1 parent e66f25d commit d4987bd
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions scripts/mkcompile_h
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit d4987bd

Please sign in to comment.