[OpenWrt-Devel] [PATCH 2/4] lldpd: move /var/run creation + chmod earlier

Alexandru Ardelean ardeleanalex at gmail.com
Mon Aug 17 11:22:40 EDT 2015


Signed-off-by: Alexandru Ardelean <aa at ocedo.com>
---
 package/network/services/lldpd/files/lldpd.init | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/package/network/services/lldpd/files/lldpd.init b/package/network/services/lldpd/files/lldpd.init
index 4b49cbd..bd957b6 100644
--- a/package/network/services/lldpd/files/lldpd.init
+++ b/package/network/services/lldpd/files/lldpd.init
@@ -47,6 +47,9 @@ start() {
 		fi
 	done
 
+	mkdir -p /var/run/lldp
+	chown lldp:lldp /var/run/lldp
+
 	[ -n "$ifnames" ] && append args "-I $ifnames"
 	[ $enable_cdp -gt 0 ] && append args '-c'
 	[ $enable_fdp -gt 0 ] && append args '-f'
@@ -54,9 +57,6 @@ start() {
 	[ $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
-
 	service_start /usr/sbin/lldpd $args \
 		${lldp_class:+ -M $lldp_class} \
 		${lldp_description:+ -S "$lldp_description"}
-- 
2.1.4
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list