savecore(8): Be quiet unless the user asks for verbose
Make savecore(8) more suitable for init-time scripts; be quiet by default. Sponsored by: EMC / Isilon Storage Division Differential Revision: https://reviews.freebsd.org/D3229
This commit is contained in:
parent
ab22155114
commit
fc6f845ec5
@ -836,15 +836,18 @@ main(int argc, char **argv)
|
||||
/* Emit minimal output. */
|
||||
if (nfound == 0) {
|
||||
if (checkfor) {
|
||||
printf("No dump exists\n");
|
||||
if (verbose)
|
||||
printf("No dump exists\n");
|
||||
exit(1);
|
||||
}
|
||||
syslog(LOG_WARNING, "no dumps found");
|
||||
}
|
||||
else if (nsaved == 0) {
|
||||
if (nerr != 0)
|
||||
syslog(LOG_WARNING, "unsaved dumps found but not saved");
|
||||
else
|
||||
if (verbose)
|
||||
syslog(LOG_WARNING, "no dumps found");
|
||||
} else if (nsaved == 0) {
|
||||
if (nerr != 0) {
|
||||
if (verbose)
|
||||
syslog(LOG_WARNING, "unsaved dumps found but not saved");
|
||||
exit(1);
|
||||
} else if (verbose)
|
||||
syslog(LOG_WARNING, "no unsaved dumps found");
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user