From d158905116698e06c7ad88ac33635ed45379a13a Mon Sep 17 00:00:00 2001 From: doktornotor Date: Fri, 13 Nov 2015 22:13:11 +0100 Subject: Add privileges configuration to ladvd package Improve some descriptions plus clean up while here. --- config/ladvd/ladvd.xml | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/config/ladvd/ladvd.xml b/config/ladvd/ladvd.xml index 5862afca..42c6485e 100644 --- a/config/ladvd/ladvd.xml +++ b/config/ladvd/ladvd.xml @@ -44,16 +44,18 @@ Link Layer Discovery Protocol LADVD - 1.0.4.2 + 1.0.4.3 Network Management Services: LADVD - Save /usr/local/pkg/ladvd.inc - /pkg_edit.php?xml=ladvd.xml&id=0 https://packages.pfsense.org/packages/config/ladvd/ladvd.inc /usr/local/pkg/ + + https://packages.pfsense.org/packages/config/ladvd/ladvd.priv.inc + /etc/inc/priv/ + /usr/local/www/ https://packages.pfsense.org/packages/config/ladvd/status_ladvd.php @@ -62,7 +64,7 @@ LADVD Modify LADVD settings.
Services
- /pkg_edit.php?xml=ladvd.xml&id=0 + /pkg_edit.php?xml=ladvd.xml LADVD Status @@ -74,12 +76,12 @@ ladvd ladvd.sh ladvd - Send and decode link layer advertisements. + Link Layer Discovery Protocol Daemon General - /pkg_edit.php?xml=ladvd.xml&id=0 + /pkg_edit.php?xml=ladvd.xml @@ -89,7 +91,7 @@ - Enable ladvd + Enable enable Enable or disable ladvd. iface_array[],autoenable,silent,management,location,lldp,cdp,edp,ndp @@ -105,7 +107,7 @@ Select the interfaces that LADVD will bind to. You can use the CTRL or COMMAND key to select multiple interfaces. - Auto-enable protocols + Auto-Enable Protocols autoenable Auto-enable protocols based on received packets (also enables receive mode). checkbox @@ -113,11 +115,11 @@ Silent silent - Silent, don't transmit packets. + Silent mode, do not transmit packets. checkbox - Management interfaces + Management Interfaces management lan interfaces_selection @@ -151,7 +153,7 @@ Enable NDP ndp - Enable NDP (Nortel Discovery Protocol) formerly called SynOptics Network Management Protocol (SONMP). + Enable NDP (Nortel Discovery Protocol); formerly called SynOptics Network Management Protocol (SONMP). checkbox -- cgit v1.2.3 From 59e50aa2c34f50c60dc517bde1b1a8d8e9fb19e2 Mon Sep 17 00:00:00 2001 From: doktornotor Date: Fri, 13 Nov 2015 22:14:48 +0100 Subject: Add privileges configuration to ladvd package --- config/ladvd/ladvd.priv.inc | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 config/ladvd/ladvd.priv.inc diff --git a/config/ladvd/ladvd.priv.inc b/config/ladvd/ladvd.priv.inc new file mode 100644 index 00000000..5dd30d44 --- /dev/null +++ b/config/ladvd/ladvd.priv.inc @@ -0,0 +1,43 @@ + -- cgit v1.2.3 From 65bc655129912c6d9c213a50c86d5d199a6474b6 Mon Sep 17 00:00:00 2001 From: doktornotor Date: Fri, 13 Nov 2015 22:16:29 +0100 Subject: Improve service handling, code style cleanups --- config/ladvd/ladvd.inc | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/config/ladvd/ladvd.inc b/config/ladvd/ladvd.inc index da37a1a9..c1d769ab 100644 --- a/config/ladvd/ladvd.inc +++ b/config/ladvd/ladvd.inc @@ -36,18 +36,24 @@ require_once("pkg-utils.inc"); function ladvd_resync_config() { global $config; - conf_mount_rw(); - - if (!is_array($config['installedpackages']['ladvd'])) + if (!is_array($config['installedpackages']['ladvd'])) { return; - if (!is_array($config['installedpackages']['ladvd']['config'])) + } + if (!is_array($config['installedpackages']['ladvd']['config'])) { return; + } $ladvd_conf = &$config['installedpackages']['ladvd']['config'][0]; + conf_mount_rw(); /* ladvd is turned off in package settings */ - if (empty($ladvd_conf['enable'])) + if (empty($ladvd_conf['enable'])) { + if (is_service_running("ladvd")) { + stop_service("ladvd"); + } + unlink_if_exists("/usr/local/etc/rc.d/ladvd.sh"); return; + } $cmdline = ""; @@ -98,7 +104,12 @@ function ladvd_resync_config() { ) ); - restart_service("ladvd"); + if (is_service_running("ladvd")) { + restart_service("ladvd"); + } else { + start_service("ladvd"); + } + sleep(1); conf_mount_ro(); } -- cgit v1.2.3 From 8c951efb90de626275e6ee14195441e362d7649e Mon Sep 17 00:00:00 2001 From: doktornotor Date: Fri, 13 Nov 2015 22:17:11 +0100 Subject: Bump ladvd package version --- pkg_config.10.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg_config.10.xml b/pkg_config.10.xml index 2f191747..de179fd5 100644 --- a/pkg_config.10.xml +++ b/pkg_config.10.xml @@ -1747,7 +1747,7 @@ Send and decode link layer advertisements. Support for LLDP (Link Layer Discovery Protocol), CDP (Cisco Discovery Protocol), EDP (Extreme Discovery Protocol) and NDP (Nortel Discovery Protocol). https://github.com/sspans/ladvd Network Management - 1.0.4.2 + 1.0.4.3 BETA ladvd-1.0.4_1-##ARCH##.pbi https://packages.pfsense.org/packages/config/ladvd/ladvd.xml -- cgit v1.2.3 From 58f8ee45074ad527939e0e3dc0ca7c3a4bc534ae Mon Sep 17 00:00:00 2001 From: doktornotor Date: Fri, 13 Nov 2015 22:17:59 +0100 Subject: Bump ladvd package version --- pkg_config.8.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg_config.8.xml b/pkg_config.8.xml index 9115e4bd..58821ddc 100644 --- a/pkg_config.8.xml +++ b/pkg_config.8.xml @@ -1800,7 +1800,7 @@ Send and decode link layer advertisements. Support for LLDP (Link Layer Discovery Protocol), CDP (Cisco Discovery Protocol), EDP (Extreme Discovery Protocol) and NDP (Nortel Discovery Protocol). https://code.google.com/p/ladvd/ Network Management - 1.0.4 + 1.0.4.3 BETA https://files.pfsense.org/packages/8/All/ ladvd-1.0.4-i386.pbi -- cgit v1.2.3 From d237f02eb1a26cd74c573de106b7eeba2e9ddd8d Mon Sep 17 00:00:00 2001 From: doktornotor Date: Fri, 13 Nov 2015 22:18:32 +0100 Subject: Bump ladvd package version --- pkg_config.8.xml.amd64 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg_config.8.xml.amd64 b/pkg_config.8.xml.amd64 index a0214f55..f4e3e1a8 100644 --- a/pkg_config.8.xml.amd64 +++ b/pkg_config.8.xml.amd64 @@ -1787,7 +1787,7 @@ Send and decode link layer advertisements. Support for LLDP (Link Layer Discovery Protocol), CDP (Cisco Discovery Protocol), EDP (Extreme Discovery Protocol) and NDP (Nortel Discovery Protocol). https://code.google.com/p/ladvd/ Network Management - 1.0.4 + 1.0.4.3 BETA https://files.pfsense.org/packages/8/All/ ladvd-1.0.4-amd64.pbi -- cgit v1.2.3