[oe] [PATCH 2/7] net-snmp: move persistent dir to /var/lib/net-snmp

jackie.huang at windriver.com jackie.huang at windriver.com
Fri Jan 16 06:14:00 UTC 2015


From: Jackie Huang <jackie.huang at windriver.com>

Move persistent dir to /var/lib/net-snmp and fix security contexts for
them.

Signed-off-by: Wenzong Fan <wenzong.fan at windriver.com>
Signed-off-by: Jackie Huang <jackie.huang at windriver.com>
---
 meta-networking/recipes-protocols/net-snmp/files/init          | 2 ++
 meta-networking/recipes-protocols/net-snmp/net-snmp_5.7.2.1.bb | 1 +
 2 files changed, 3 insertions(+)

diff --git a/meta-networking/recipes-protocols/net-snmp/files/init b/meta-networking/recipes-protocols/net-snmp/files/init
index 434b2fa..6b02570 100755
--- a/meta-networking/recipes-protocols/net-snmp/files/init
+++ b/meta-networking/recipes-protocols/net-snmp/files/init
@@ -28,6 +28,8 @@ case "$1" in
 	echo -n " snmptrapd"
     fi
     echo "."
+
+    test ! -x /sbin/restorecon || /sbin/restorecon -FR /var/lib/net-snmp
     ;;
   stop)
     echo -n "Stopping network management services:"
diff --git a/meta-networking/recipes-protocols/net-snmp/net-snmp_5.7.2.1.bb b/meta-networking/recipes-protocols/net-snmp/net-snmp_5.7.2.1.bb
index 07c7b60..3567094 100644
--- a/meta-networking/recipes-protocols/net-snmp/net-snmp_5.7.2.1.bb
+++ b/meta-networking/recipes-protocols/net-snmp/net-snmp_5.7.2.1.bb
@@ -34,6 +34,7 @@ EXTRA_OECONF = "--disable-embedded-perl \
                 --enable-shared \
                 --disable-manuals \
                 --with-defaults \
+                --with-persistent-directory=${localstatedir}/lib/net-snmp \
                 ${@base_conditional('SITEINFO_ENDIANNESS', 'le', '--with-endianness=little', '--with-endianness=big', d)}"
 
 # net-snmp needs to have mib-modules=smux enabled to enable quagga to support snmp
-- 
1.9.1




More information about the Openembedded-devel mailing list