aboutsummaryrefslogtreecommitdiffstats
path: root/driver.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>1997-08-04 04:10:40 +0000
committerEric S. Raymond <esr@thyrsus.com>1997-08-04 04:10:40 +0000
commit4fe1884292376b223d3dee76b194a47e90323541 (patch)
treeb47d68765ace204afe94e2fa14576ba6bb42566b /driver.c
parentdcb63c343a411c59257407b07f08c2210e236c80 (diff)
downloadfetchmail-4fe1884292376b223d3dee76b194a47e90323541.tar.gz
fetchmail-4fe1884292376b223d3dee76b194a47e90323541.tar.bz2
fetchmail-4fe1884292376b223d3dee76b194a47e90323541.zip
Added `postconnect'.
svn path=/trunk/; revision=1226
Diffstat (limited to 'driver.c')
-rw-r--r--driver.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/driver.c b/driver.c
index f5123c19..6144fb33 100644
--- a/driver.c
+++ b/driver.c
@@ -1770,6 +1770,17 @@ const struct method *proto; /* protocol method table */
error(0,-1, "%s error while fetching from %s", msg, ctl->server.pollname);
closeUp:
+ /* execute post-initialization command, if any */
+ if (ctl->postconnect && (ok = system(ctl->postconnect)))
+ {
+ char buf[80];
+
+ sprintf(buf, "post-connection command failed with status %d", ok);
+ error(0, 0, buf);
+ if (ok == PS_SUCCESS)
+ ok = PS_SYNTAX;
+ }
+
signal(SIGALRM, sigsave);
return(ok);
}