diff options
Diffstat (limited to 'scripts/mkcompile_h')
-rwxr-xr-x | scripts/mkcompile_h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/scripts/mkcompile_h b/scripts/mkcompile_h index 6a12dd9f1181..f060763c0c6a 100755 --- a/scripts/mkcompile_h +++ b/scripts/mkcompile_h | |||
@@ -66,9 +66,13 @@ UTS_TRUNCATE="sed -e s/\(.\{1,$UTS_LEN\}\).*/\1/" | |||
66 | echo \#define LINUX_COMPILE_HOST \"`hostname | $UTS_TRUNCATE`\" | 66 | echo \#define LINUX_COMPILE_HOST \"`hostname | $UTS_TRUNCATE`\" |
67 | 67 | ||
68 | if [ -x /bin/dnsdomainname ]; then | 68 | if [ -x /bin/dnsdomainname ]; then |
69 | echo \#define LINUX_COMPILE_DOMAIN \"`dnsdomainname | $UTS_TRUNCATE`\" | 69 | domain=`dnsdomainname 2> /dev/null` |
70 | elif [ -x /bin/domainname ]; then | 70 | elif [ -x /bin/domainname ]; then |
71 | echo \#define LINUX_COMPILE_DOMAIN \"`domainname | $UTS_TRUNCATE`\" | 71 | domain=`domainname 2> /dev/null` |
72 | fi | ||
73 | |||
74 | if [ -n "$domain" ]; then | ||
75 | echo \#define LINUX_COMPILE_DOMAIN \"`echo $domain | $UTS_TRUNCATE`\" | ||
72 | else | 76 | else |
73 | echo \#define LINUX_COMPILE_DOMAIN | 77 | echo \#define LINUX_COMPILE_DOMAIN |
74 | fi | 78 | fi |