diff options
| author | Lucas de Castro Borges <lucas@gnuabordo.com.br> | 2024-06-03 20:22:57 -0300 |
|---|---|---|
| committer | Lucas de Castro Borges <lucas@gnuabordo.com.br> | 2024-06-03 20:22:57 -0300 |
| commit | 06dfb1368b13f328dbfb5efc97e0f06d156e6153 (patch) | |
| tree | bf5efa9f4a7653c4827697f2f625da4a9fcb14f9 | |
| parent | 2867b4bd490c6549a39a4586aeafbf83358dd183 (diff) | |
New upstream version 1.0.11
| -rw-r--r-- | config.c | 5 | ||||
| -rw-r--r-- | config.h | 3 | ||||
| -rw-r--r-- | foolsm.c | 4 | ||||
| -rw-r--r-- | foolsm.conf.sample | 2 | ||||
| -rw-r--r-- | foolsm.init | 1 | ||||
| -rw-r--r-- | foolsm.spec | 7 | ||||
| -rw-r--r-- | group_script | 1 |
7 files changed, 17 insertions, 6 deletions
@@ -1,6 +1,6 @@ /* -(C) 2009-2015 Mika Ilmaranta <ilmis@nullnet.fi> +(C) 2009-2019 Mika Ilmaranta <ilmis@nullnet.fi> License: GPLv2 @@ -110,6 +110,7 @@ void free_config(CONFIG **first, CONFIG **last, GROUPS **firstg, GROUPS **lastg) if(curg->eventscript && curg->eventscript != defaults.eventscript) release(&curg->eventscript); if(curg->notifyscript && curg->notifyscript != defaults.notifyscript) release(&curg->notifyscript); if(curg->warn_email && curg->warn_email != defaults.warn_email) release(&curg->warn_email); + if(curg->device && curg->device != defaults.device) release(&curg->device); if(curg->queue && curg->queue != defaults.queue) release(&curg->queue); prevg = curg; @@ -426,6 +427,7 @@ static void read_one_config(char *fn, CONFIG **first, CONFIG **last, GROUPS **fi else if(!eqcmp(buf, "unknown_up_notify")) curg->unknown_up_notify = atoi(strchr(buf, '=') + 1); else if(!eqcmp(buf, "warn_email")) curg->warn_email = strdup(strchr(buf, '=') + 1); else if(!eqcmp(buf, "logic")) curg->logic = atoi(strchr(buf, '=') + 1); + else if(!eqcmp(buf, "device")) curg->device = strdup(strchr(buf, '=') + 1); else if(!eqcmp(buf, "status")) curg->status = atoi(strchr(buf, '=') + 1); else if(!eqcmp(buf, "queue")) curg->queue = strdup(strchr(buf, '=') + 1); else if(!eqcmp(buf, "member-connection")) { @@ -535,6 +537,7 @@ static void read_one_config(char *fn, CONFIG **first, CONFIG **last, GROUPS **fi curg->unknown_up_notify = defaults.unknown_up_notify; curg->warn_email = defaults.warn_email; curg->logic = 0; /* default group logic or */ + curg->device = defaults.device; curg->status = defaults.status; curg->queue = defaults.queue; @@ -1,6 +1,6 @@ /* -(C) 2009-2015 Mika Ilmaranta <ilmis@nullnet.fi> +(C) 2009-2019 Mika Ilmaranta <ilmis@nullnet.fi> License: GPLv2 @@ -68,6 +68,7 @@ typedef struct groups { int unknown_up_notify; char *warn_email; int logic; /* or = 0, and = 1 */ + char *device; STATUS status; char *queue; @@ -1,6 +1,6 @@ /* -(C) 2009-2015 Mika Ilmaranta <ilmis@nullnet.fi> +(C) 2009-2019 Mika Ilmaranta <ilmis@nullnet.fi> License: GPLv2 @@ -775,7 +775,7 @@ static void groups_decide(GROUPS *firstg){ get_status_str(curg->status), curg->name, "", - "", + curg->device ? curg->device : "", curg->warn_email ? curg->warn_email : "", 0, 0, diff --git a/foolsm.conf.sample b/foolsm.conf.sample index 0d071f6..74d78cb 100644 --- a/foolsm.conf.sample +++ b/foolsm.conf.sample @@ -133,6 +133,8 @@ defaults { # name=conn-group-a # eventscript=/usr/libexec/lsm/default_script # warn_email=root@some.domain.tld +# # device name reported to the scripts +# device=eth0 # # logic between member connetion statuses # # logic=0 == or # # logic=1 == and diff --git a/foolsm.init b/foolsm.init index e9e12ea..cc81dc3 100644 --- a/foolsm.init +++ b/foolsm.init @@ -11,6 +11,7 @@ # Provides: foolsm # Required-Start: $network $syslog # Required-Stop: +# Default-Start: # Default-Stop: 0 1 6 # Short-Description: Foolsm - link status monitor # Description: Foolsm is the link status monitor diff --git a/foolsm.spec b/foolsm.spec index 4094ed6..0b6bd5f 100644 --- a/foolsm.spec +++ b/foolsm.spec @@ -7,7 +7,7 @@ Summary: The Foobar Link Status Monitor Name: foolsm -Version: 1.0.10 +Version: 1.0.11 Release: 1%{?dist} License: GPLv2 URL: http://lsm.foobar.fi/ @@ -180,13 +180,16 @@ fi %dir %{_sharedstatedir}/foolsm %changelog +* Fri Sep 20 2019 Mika Ilmaranta <ilmis@nullnet.fi> - 1.0.11-1 +- added support for group to have device name + * Tue Jul 25 2017 Mika Ilmaranta <ilmis@nullnet.fi> - 1.0.10-1 - debian patch from Roberto Suárez Soto * Sun Dec 18 2016 Mika Ilmaranta <ilmis@nullnet.fi> - 1.0.9-1 - README: fixed note about assumed start state -* Wed Sep 9 2016 Mika Ilmaranta <ilmis@nullnet.fi> - 1.0.8-1 +* Fri Sep 9 2016 Mika Ilmaranta <ilmis@nullnet.fi> - 1.0.8-1 - foolsm.spec: triggers to move old lsm config for foolsm - fix forever loop in waitpid while loop diff --git a/group_script b/group_script index c50887f..d15228b 100644 --- a/group_script +++ b/group_script @@ -43,6 +43,7 @@ prevstate = ${PREVSTATE} newstate = ${STATE} name = ${NAME} warn_email = ${WARN_EMAIL} +device = ${DEVICE} Packet statuses are not available for groups. |
