aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael K. Johnson <johnsonm@redhat.com>1999-12-06 19:18:02 +0000
committerMichael K. Johnson <johnsonm@redhat.com>1999-12-06 19:18:02 +0000
commit94361dc3c20688978c097ce401706fb8764a883e (patch)
tree1599d5d84c236b9276ad8df47146709fd336da3d
parent52599fc1f8513c2fefad8d6828b8b8ddcb08f504 (diff)
downloadinitscripts-94361dc3c20688978c097ce401706fb8764a883e.tar
initscripts-94361dc3c20688978c097ce401706fb8764a883e.tar.gz
initscripts-94361dc3c20688978c097ce401706fb8764a883e.tar.bz2
initscripts-94361dc3c20688978c097ce401706fb8764a883e.tar.xz
initscripts-94361dc3c20688978c097ce401706fb8764a883e.zip
redial after RETRYTIMEOUT on script failure
-rw-r--r--src/ppp-watch.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/ppp-watch.c b/src/ppp-watch.c
index 62d20d01..8e6357db 100644
--- a/src/ppp-watch.c
+++ b/src/ppp-watch.c
@@ -517,6 +517,7 @@ main(int argc, char **argv) {
while (1) {
sigsuspend(&sigs);
+
if (theSigterm || theSigint) {
theSigterm = theSigint = 0;
@@ -537,6 +538,7 @@ main(int argc, char **argv) {
cleanExit(32);
}
}
+
if (theSighup) {
theSighup = 0;
if (ifcfg->parent) svCloseFile(ifcfg->parent);
@@ -549,6 +551,7 @@ main(int argc, char **argv) {
connectedOnce = 0;
timeout = 0; /* redial immediately */
}
+
if (theSigio) {
theSigio = 0;
if (connectedOnce) {
@@ -570,6 +573,7 @@ main(int argc, char **argv) {
}
}
}
+
if (theSigchld) {
theSigchld = 0;
waited = wait3(&status, 0, NULL);
@@ -605,7 +609,8 @@ main(int argc, char **argv) {
break;
}
- if (!connectedOnce || svTrueValue(ifcfg, "PERSIST", 0)) {
+ if ((WEXITSTATUS(status) == 8) ||
+ !connectedOnce || svTrueValue(ifcfg, "PERSIST", 0)) {
temp = svGetValue(ifcfg, "RETRYTIMEOUT");
if (temp) {
timeout = atoi(temp);
@@ -623,6 +628,7 @@ main(int argc, char **argv) {
cleanExit(WEXITSTATUS(status));
}
}
+
if (theSigalrm) {
detach(1, 34, NULL);
}