From 356c792b1bf70141bd75e11353d8f3b146aaee52 Mon Sep 17 00:00:00 2001 From: Jackie Huang Date: Fri, 16 Jan 2015 14:14:00 +0800 Subject: 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 Signed-off-by: Jackie Huang Signed-off-by: Joe MacDonald --- 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 434b2fa3f..6b02570c6 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 16d733cb1..bf67216a4 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 -- cgit v1.2.3-54-g00ecf