aboutsummaryrefslogtreecommitdiffstats
path: root/src/ppp-watch.c
diff options
context:
space:
mode:
authorMichael K. Johnson <johnsonm@redhat.com>1999-11-19 23:02:36 +0000
committerMichael K. Johnson <johnsonm@redhat.com>1999-11-19 23:02:36 +0000
commita10fe9fff25c3d533274ebfb034af12b1a8b69b0 (patch)
treeffe1a368fd08cea992d49a5dd45f3eaea46ede51 /src/ppp-watch.c
parentd3d803759abbf7bf590d564cdf1d510605a7ea20 (diff)
downloadinitscripts-a10fe9fff25c3d533274ebfb034af12b1a8b69b0.tar
initscripts-a10fe9fff25c3d533274ebfb034af12b1a8b69b0.tar.gz
initscripts-a10fe9fff25c3d533274ebfb034af12b1a8b69b0.tar.bz2
initscripts-a10fe9fff25c3d533274ebfb034af12b1a8b69b0.tar.xz
initscripts-a10fe9fff25c3d533274ebfb034af12b1a8b69b0.zip
try not to fill up the logs with pppd failures
Diffstat (limited to 'src/ppp-watch.c')
-rw-r--r--src/ppp-watch.c15
1 files changed, 14 insertions, 1 deletions
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) {