summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2008-11-04 20:50:38 +1100
committerNeilBrown <neilb@suse.de>2008-11-04 20:50:38 +1100
commit9180c81bd7f4f3dd2fb9f2835894d8c0e9488dbd (patch)
tree2caedf5b94048b44d1c6106866e7658d7d334c00
parentcf8de6913b63a99602cc2bb6e6ea7b9f9eb694d9 (diff)
downloadmdadm-9180c81bd7f4f3dd2fb9f2835894d8c0e9488dbd.tar.gz
Always set 'homehost' if not specified.
The default for 'homehost' is now '<system>' rather than unspecified.
-rw-r--r--mdadm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mdadm.c b/mdadm.c
index b2ec6f9..f830a8d 100644
--- a/mdadm.c
+++ b/mdadm.c
@@ -997,7 +997,7 @@ int main(int argc, char *argv[])
if (homehost == NULL)
homehost = conf_get_homehost();
- if (homehost && strcmp(homehost, "<system>")==0) {
+ if (homehost == NULL || strcmp(homehost, "<system>")==0) {
if (gethostname(sys_hostname, sizeof(sys_hostname)) == 0) {
sys_hostname[sizeof(sys_hostname)-1] = 0;
homehost = sys_hostname;