diff options
author | pjd <pjd@FreeBSD.org> | 2007-04-13 10:25:49 +0000 |
---|---|---|
committer | pjd <pjd@FreeBSD.org> | 2007-04-13 10:25:49 +0000 |
commit | 1a9b4ef00026ba68bc71de5107563acbe43b38bc (patch) | |
tree | 41a3fc0a5dccba10396fc8f0205717d3c74c831c /usr.sbin | |
parent | aa9e6582b9f35c791921194962760619cfb2032c (diff) | |
download | FreeBSD-src-1a9b4ef00026ba68bc71de5107563acbe43b38bc.zip FreeBSD-src-1a9b4ef00026ba68bc71de5107563acbe43b38bc.tar.gz |
Fatal error is only when cannot open any of the given exports files.
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/mountd/mountd.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/usr.sbin/mountd/mountd.c b/usr.sbin/mountd/mountd.c index 55100d9..f7cb726 100644 --- a/usr.sbin/mountd/mountd.c +++ b/usr.sbin/mountd/mountd.c @@ -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); } } |