Fatal error is only when cannot open any of the given exports files.
This commit is contained in:
parent
aa9e6582b9
commit
1a9b4ef000
@ -1202,6 +1202,7 @@ get_exportlist()
|
||||
char errmsg[255];
|
||||
int dirplen, num, i;
|
||||
int iovlen;
|
||||
int done;
|
||||
|
||||
bzero(&export, sizeof(export));
|
||||
export.ex_flags = MNT_DELEXPORT;
|
||||
@ -1304,15 +1305,21 @@ get_exportlist()
|
||||
* Read in the exports file and build the list, calling
|
||||
* nmount() as we go along to push the export rules into the kernel.
|
||||
*/
|
||||
done = 0;
|
||||
for (i = 0; exnames[i] != NULL; i++) {
|
||||
if (debug)
|
||||
warnx("reading exports from %s", exnames[i]);
|
||||
if ((exp_file = fopen(exnames[i], "r")) == NULL) {
|
||||
syslog(LOG_ERR, "can't open %s", exnames[i]);
|
||||
exit(2);
|
||||
syslog(LOG_WARNING, "can't open %s", exnames[i]);
|
||||
continue;
|
||||
}
|
||||
get_exportlist_one();
|
||||
fclose(exp_file);
|
||||
done++;
|
||||
}
|
||||
if (done == 0) {
|
||||
syslog(LOG_ERR, "can't open any exports file");
|
||||
exit(2);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user