]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
Always set 'homehost' if not specified.
authorNeilBrown <neilb@suse.de>
Tue, 4 Nov 2008 09:50:38 +0000 (20:50 +1100)
committerNeilBrown <neilb@suse.de>
Tue, 4 Nov 2008 09:50:38 +0000 (20:50 +1100)
The default for 'homehost' is now '<system>' rather than
unspecified.

mdadm.c

diff --git a/mdadm.c b/mdadm.c
index b2ec6f904163203252935898257e17147184c908..f830a8dd21ca1ed2d010adb935c17a0848116973 100644 (file)
--- 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;