aboutsummaryrefslogtreecommitdiffstats
path: root/pingu.c
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2011-07-08 11:26:03 +0200
committerNatanael Copa <ncopa@alpinelinux.org>2011-07-08 11:26:03 +0200
commit6a3615ac20970c6cee440ab65234e828013be10b (patch)
treead634380a20799418fa00a1102f5cf79e0e8c757 /pingu.c
parent312cea0e34d3e2f7dbbe3f3832a6b1440ed57563 (diff)
downloadpingu-6a3615ac20970c6cee440ab65234e828013be10b.tar.bz2
pingu-6a3615ac20970c6cee440ab65234e828013be10b.tar.xz
pingu: run the route-script again
Diffstat (limited to 'pingu.c')
-rw-r--r--pingu.c51
1 files changed, 0 insertions, 51 deletions
diff --git a/pingu.c b/pingu.c
index bc488ed..41529f4 100644
--- a/pingu.c
+++ b/pingu.c
@@ -53,57 +53,6 @@ int usage(const char *program)
return 1;
}
-char *get_provider_gateway(struct pingu_host *p)
-{
- if (p->gateway != NULL)
- return p->gateway;
- return p->host;
-}
-
-#if 0
-void exec_route_change(struct list_head *head)
-{
- struct pingu_host *p;
- struct list_head *n;
- char **args;
- int i = 0, status;
- pid_t pid;
-
- if (default_route_script == NULL)
- return;
-
- list_for_each(n, head)
- i++;
-
- args = xmalloc(sizeof(char *) * (i + 2));
-
- i = 0;
- args[i++] = default_route_script;
- list_for_each_entry(p, head, host_list_entry) {
- if (p->status)
- args[i++] = get_provider_gateway(p);
- }
- args[i] = NULL;
- pid = fork();
- switch (pid) {
- case -1:
- log_perror("fork");
- goto free_and_return;
- break;
- case 0:
- execvp(default_route_script, args);
- log_perror(args[0]);
- exit(1);
- default:
- wait(&status);
- }
-
-free_and_return:
- free(args);
- return;
-}
-#endif
-
static void remove_pid_file(void)
{
if (pid_file_fd != 0) {