aboutsummaryrefslogtreecommitdiffstats
path: root/package/network
diff options
context:
space:
mode:
authorJohn Crispin <john@openwrt.org>2015-03-12 10:06:08 +0000
committerJohn Crispin <john@openwrt.org>2015-03-12 10:06:08 +0000
commit470e89f977ac170da86453cad90d334dfef41275 (patch)
tree07213b633f5cf01c1cad10fb9d10260c292ad70a /package/network
parente995ed50602bc5c5b6831c1e6805811c0e739ecf (diff)
downloadupstream-470e89f977ac170da86453cad90d334dfef41275.tar.gz
upstream-470e89f977ac170da86453cad90d334dfef41275.tar.bz2
upstream-470e89f977ac170da86453cad90d334dfef41275.zip
lldpd: add support for 'readonly_mode'
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com> SVN-Revision: 44689
Diffstat (limited to 'package/network')
-rw-r--r--package/network/services/lldpd/files/lldpd.init3
1 files changed, 3 insertions, 0 deletions
diff --git a/package/network/services/lldpd/files/lldpd.init b/package/network/services/lldpd/files/lldpd.init
index 2b1b223663..40f2611625 100644
--- a/package/network/services/lldpd/files/lldpd.init
+++ b/package/network/services/lldpd/files/lldpd.init
@@ -24,6 +24,7 @@ start() {
local lldp_class
local lldp_location
local lldp_description
+ local readonly_mode
config_load 'lldpd'
config_get_bool enable_cdp 'config' 'enable_cdp' 0
@@ -33,6 +34,7 @@ start() {
config_get lldp_class 'config' 'lldp_class'
config_get lldp_location 'config' 'lldp_location'
config_get lldp_description 'config' 'lldp_description' "$(find_release_info)"
+ config_get_bool readonly_mode 'config' 'readonly_mode' 0
local ifaces
config_get ifaces 'config' 'interface'
@@ -50,6 +52,7 @@ start() {
[ $enable_fdp -gt 0 ] && append args '-f'
[ $enable_sonmp -gt 0 ] && append args '-s'
[ $enable_edp -gt 0 ] && append args '-e'
+ [ $readonly_mode -gt 0 ] && append args '-r'
mkdir -p /var/run/lldp
chown lldp:lldp /var/run/lldp