]> git.ipfire.org Git - thirdparty/mdadm.git/blobdiff - config.c
config: restore the possibility of a NULL homehost
[thirdparty/mdadm.git] / config.c
index 0dbe61ed30ab03c8382e1b758d99da0d4c94f83d..ad75411cf68b94aeef79d02f3c2dbf7b83ceb121 100644 (file)
--- a/config.c
+++ b/config.c
@@ -589,9 +589,12 @@ void homehostline(char *line)
        for (w=dl_next(line); w != line ; w=dl_next(w)) {
                if (strcasecmp(w, "<ignore>")==0)
                        require_homehost = 0;
-               else if (home_host == NULL)
-                       home_host = strdup(w);
-               else
+               else if (home_host == NULL) {
+                       if (strcasecmp(w, "<none>")==0)
+                               home_host = strdup("");
+                       else
+                               home_host = strdup(w);
+               }else
                        fprintf(stderr, Name ": excess host name on HOMEHOST line: %s - ignored\n",
                                w);
        }