From a10fe9fff25c3d533274ebfb034af12b1a8b69b0 Mon Sep 17 00:00:00 2001 From: "Michael K. Johnson" Date: Fri, 19 Nov 1999 23:02:36 +0000 Subject: try not to fill up the logs with pppd failures --- src/ppp-watch.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/ppp-watch.c b/src/ppp-watch.c index 722adcc6..a1dd3705 100644 --- a/src/ppp-watch.c +++ b/src/ppp-watch.c @@ -126,11 +126,12 @@ detach(int now, int parentExitCode, char *device) { break; case 33: fprintf(stderr, "%s already up, initiating redial\n", device); + break; case 34: fprintf(stderr, "Failed to activate %s, retrying in the background\n", device); break; default: - fprintf(stderr, "Failed to activate %s\n", device); + fprintf(stderr, "Failed to activate %s with error %d\n", device, exitCode); break; } exit(exitCode); @@ -553,6 +554,18 @@ main(int argc, char **argv) { if (!WIFEXITED(status)) cleanExit(29); if (dieing) cleanExit(WEXITSTATUS(status)); + /* error conditions from which we do not expect to recover + * without user intervention -- do not fill up the logs. + */ + switch (WEXITSTATUS(status)) { + case 1: case 2: case 3: case 4: case 6: + case 7: case 9: case 14: case 17: + cleanExit(WEXITSTATUS(status)); + break; + default: + break; + } + if (!connectedOnce || svTrueValue(ifcfg, "PERSIST", 0)) { temp = svGetValue(ifcfg, "RETRYTIMEOUT"); if (temp) { -- cgit v1.2.1