--- pump-0.8.14/pump.c.chmou 2002-06-18 19:03:59.000000000 +0200 +++ pump-0.8.14/pump.c 2003-01-20 18:38:13.000000000 +0100 @@ -132,6 +132,38 @@ return NULL; } +int launch (char *program) +{ + struct stat s; + pid_t pid; + + if (!stat(program, &s)) { + pid = fork(); + if (pid == 0) { + execv(program, NULL); + perror("execv"); + exit(1); + } else { + if (pid > 0) { + int status; + + waitpid(pid, &status, 0); + + if (WIFEXITED(status)) { + return(WEXITSTATUS(status)); + } else{ + return EXIT_FAILURE; + } + } else{ + perror("fork"); + return EXIT_FAILURE; + } + } + } + return 0; +} + + static void createResolvConf(struct pumpNetIntf * intf, char * domain, int isSearchPath) { FILE * f; @@ -939,5 +971,6 @@ response.u.status.nisDomain); } + if (cmd.type == CMD_STARTIFACE && !nodns) launch("/sbin/update-resolvrdv"); return 0; } --- pump-0.8.14/pump.h.chmou 2002-06-18 19:03:59.000000000 +0200 +++ pump-0.8.14/pump.h 2003-01-20 18:38:13.000000000 +0100 @@ -97,6 +97,7 @@ int pumpDhcpRenew(struct pumpNetIntf * intf); int pumpDhcpRelease(struct pumpNetIntf * intf); int pumpSetupDefaultGateway(struct in_addr * gw); +int launch(char *program); time_t pumpUptime(void); #define RESULT_OKAY 0