aboutsummaryrefslogtreecommitdiffstats
path: root/package/network/services/lldpd/files
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2012-10-12 11:58:19 +0000
committerJo-Philipp Wich <jow@openwrt.org>2012-10-12 11:58:19 +0000
commit0019b390012a96cbbaee498382c335ebcec66183 (patch)
tree54f28b155422500a2dc21a160493a67f17289048 /package/network/services/lldpd/files
parentf248332d523680d0b4dd91c3f78fa5d449456331 (diff)
downloadupstream-0019b390012a96cbbaee498382c335ebcec66183.tar.gz
upstream-0019b390012a96cbbaee498382c335ebcec66183.tar.bz2
upstream-0019b390012a96cbbaee498382c335ebcec66183.zip
lldpd: bump to v0.6.1, enable privilege separation and chrooting
SVN-Revision: 33729
Diffstat (limited to 'package/network/services/lldpd/files')
-rw-r--r--package/network/services/lldpd/files/lldpd.init7
1 files changed, 7 insertions, 0 deletions
diff --git a/package/network/services/lldpd/files/lldpd.init b/package/network/services/lldpd/files/lldpd.init
index 5d34283883..0ef64e08e6 100644
--- a/package/network/services/lldpd/files/lldpd.init
+++ b/package/network/services/lldpd/files/lldpd.init
@@ -26,6 +26,12 @@ start() {
[ $enable_sonmp -gt 0 ] && append args '-s'
[ $enable_edp -gt 0 ] && append args '-e'
+ user_exists lldp 121 || user_add lldp 121 129
+ group_exists lldp 129 || group_add lldp 129
+
+ mkdir -p /var/run/lldp
+ chown lldp:lldp /var/run/lldp
+
service_start /usr/sbin/lldpd $args \
${lldp_class:+ -M $lldp_class}
@@ -37,4 +43,5 @@ start() {
stop() {
service_stop /usr/sbin/lldpd
+ rm -f /var/run/lldpd.socket /var/run/lldpd.pid
}