Config: multiple occurences of lines is not an error.
As we now support config directories it is helpful if lines are allowed to occur multiple times with one over-riding the other. So stop giving warnings when later lines are ignored. Signed-off-by: NeilBrown <neilb@suse.de>
This commit is contained in:
parent
9dc70cbc54
commit
3c6e95c1aa
22
config.c
22
config.c
|
@ -507,13 +507,9 @@ void mailline(char *line)
|
||||||
{
|
{
|
||||||
char *w;
|
char *w;
|
||||||
|
|
||||||
for (w=dl_next(line); w != line ; w=dl_next(w)) {
|
for (w=dl_next(line); w != line ; w=dl_next(w))
|
||||||
if (alert_email == NULL)
|
if (alert_email == NULL)
|
||||||
alert_email = xstrdup(w);
|
alert_email = xstrdup(w);
|
||||||
else
|
|
||||||
pr_err("excess address on MAIL line: %s - ignored\n",
|
|
||||||
w);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static char *alert_mail_from = NULL;
|
static char *alert_mail_from = NULL;
|
||||||
|
@ -540,13 +536,9 @@ void programline(char *line)
|
||||||
{
|
{
|
||||||
char *w;
|
char *w;
|
||||||
|
|
||||||
for (w=dl_next(line); w != line ; w=dl_next(w)) {
|
for (w=dl_next(line); w != line ; w=dl_next(w))
|
||||||
if (alert_program == NULL)
|
if (alert_program == NULL)
|
||||||
alert_program = xstrdup(w);
|
alert_program = xstrdup(w);
|
||||||
else
|
|
||||||
pr_err("excess program on PROGRAM line: %s - ignored\n",
|
|
||||||
w);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static char *home_host = NULL;
|
static char *home_host = NULL;
|
||||||
|
@ -563,9 +555,7 @@ void homehostline(char *line)
|
||||||
home_host = xstrdup("");
|
home_host = xstrdup("");
|
||||||
else
|
else
|
||||||
home_host = xstrdup(w);
|
home_host = xstrdup(w);
|
||||||
}else
|
}
|
||||||
pr_err("excess host name on HOMEHOST line: %s - ignored\n",
|
|
||||||
w);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -583,11 +573,9 @@ void autoline(char *line)
|
||||||
int homehost = 0;
|
int homehost = 0;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
if (auto_seen) {
|
if (auto_seen)
|
||||||
pr_err("AUTO line may only be give once."
|
|
||||||
" Subsequent lines ignored\n");
|
|
||||||
return;
|
return;
|
||||||
}
|
|
||||||
/* Parse the 'auto' line creating policy statements for the 'auto' policy.
|
/* Parse the 'auto' line creating policy statements for the 'auto' policy.
|
||||||
*
|
*
|
||||||
* The default is 'yes' but the 'auto' line might over-ride that.
|
* The default is 'yes' but the 'auto' line might over-ride that.
|
||||||
|
|
13
mdadm.conf.5
13
mdadm.conf.5
|
@ -256,8 +256,8 @@ mode (and was given the
|
||||||
.B \-\-scan
|
.B \-\-scan
|
||||||
option). There should only be one
|
option). There should only be one
|
||||||
.B MAILADDR
|
.B MAILADDR
|
||||||
line and it should have only one address.
|
line and it should have only one address. Any subsequent addresses
|
||||||
|
are silently ignored.
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
.B MAILFROM
|
.B MAILFROM
|
||||||
|
@ -397,7 +397,9 @@ is given it is also possible to give an explicit name which will be
|
||||||
used when creating arrays. This is the only case when there can be
|
used when creating arrays. This is the only case when there can be
|
||||||
more that one other word on the
|
more that one other word on the
|
||||||
.B HOMEHOST
|
.B HOMEHOST
|
||||||
line.
|
line. If there are other words, or other
|
||||||
|
.B HOMEHOST
|
||||||
|
lines, they are silently ignored.
|
||||||
|
|
||||||
If
|
If
|
||||||
.B <none>
|
.B <none>
|
||||||
|
@ -461,6 +463,11 @@ The known metadata types are
|
||||||
.BR ddf ,
|
.BR ddf ,
|
||||||
.BR imsm .
|
.BR imsm .
|
||||||
|
|
||||||
|
.B AUTO
|
||||||
|
should be given at most once. Subsequent lines are silently ignored.
|
||||||
|
Thus an earlier config file in a config directory will over-ride
|
||||||
|
the setting in a later config file.
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
.B POLICY
|
.B POLICY
|
||||||
This is used to specify what automatic behavior is allowed on devices
|
This is used to specify what automatic behavior is allowed on devices
|
||||||
|
|
Loading…
Reference in New Issue