Do not exit if unable to read /etc/dumpdates or create it.

If one is trying to dump or repair an ill system, give the user a fighting
chance.  Refusing to operate w/o a very non-critical file (feature) is
just plain stupid.
This commit is contained in:
David E. O'Brien 2001-03-27 19:28:00 +00:00
parent 05ca2115ba
commit 8cc6e4d84a
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=74872

View File

@ -85,8 +85,9 @@ initdumptimes()
if ((df = fopen(dumpdates, "r")) == NULL) {
if (errno != ENOENT) {
quit("cannot read %s: %s\n", dumpdates,
msg("cannot read %s: %s\n", dumpdates,
strerror(errno));
return;
/* NOTREACHED */
}
/*
@ -94,8 +95,9 @@ initdumptimes()
*/
msg("WARNING: no file `%s', making an empty one\n", dumpdates);
if ((df = fopen(dumpdates, "w")) == NULL) {
quit("cannot create %s: %s\n", dumpdates,
msg("cannot create %s: %s\n", dumpdates,
strerror(errno));
return;
/* NOTREACHED */
}
(void) fclose(df);