[oe-commits] Jackie Huang : net-snmp: move persistent dir to /var/lib/net-snmp

git at git.openembedded.org git at git.openembedded.org
Thu Mar 12 11:55:13 UTC 2015


Module: meta-openembedded.git
Branch: master-next
Commit: 356c792b1bf70141bd75e11353d8f3b146aaee52
URL:    http://git.openembedded.org/?p=meta-openembedded.git&a=commit;h=356c792b1bf70141bd75e11353d8f3b146aaee52

Author: Jackie Huang <jackie.huang at windriver.com>
Date:   Fri Jan 16 14:14:00 2015 +0800

net-snmp: move persistent dir to /var/lib/net-snmp

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>
Signed-off-by: Joe MacDonald <joe_macdonald at mentor.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 16d733c..bf67216 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
@@ -38,6 +38,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



More information about the Openembedded-commits mailing list