From 5ada538d0db547bf678cdcebfbcc55ec88c201b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Radek=20Vok=C3=A1l?= Date: Wed, 12 Jul 2006 12:32:23 +0000 Subject: [PATCH] - fix init script, read .options files from /etc/snmp (#195702) --- net-snmp.spec | 5 ++++- net-snmpd.init | 7 ++++++- net-snmptrapd.init | 7 +++++-- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/net-snmp.spec b/net-snmp.spec index 9d774d2..b25462d 100644 --- a/net-snmp.spec +++ b/net-snmp.spec @@ -6,7 +6,7 @@ Summary: A collection of SNMP protocol tools and libraries. Name: net-snmp Version: 5.3.1.rc4 -Release: 1.1 +Release: 2 License: BSDish Group: System Environment/Daemons @@ -344,6 +344,9 @@ rm -rf ${RPM_BUILD_ROOT} %{_libdir}/*.a %changelog +* Wed Jul 12 2006 Radek Vokál 5.3.1.rc4-2 +- fix init script, read .options files from /etc/snmp (#195702) + * Wed Jul 12 2006 Jesse Keating - 5.3.1.rc4-1.1 - rebuild diff --git a/net-snmpd.init b/net-snmpd.init index 302a88f..2f210d8 100755 --- a/net-snmpd.init +++ b/net-snmpd.init @@ -12,7 +12,12 @@ # source function library . /etc/init.d/functions -OPTIONS="-Lsd -Lf /dev/null -p /var/run/snmpd -a" +if [ -e /etc/snmp/snmpd.options ]; then + . /etc/snmp/snmpd.options +else + OPTIONS="-Lsd -Lf /dev/null -p /var/run/snmpd -a" +fi + RETVAL=0 prog="snmpd" diff --git a/net-snmptrapd.init b/net-snmptrapd.init index 3b8a5c8..61266bd 100755 --- a/net-snmptrapd.init +++ b/net-snmptrapd.init @@ -13,9 +13,12 @@ # source function library . /etc/init.d/functions -[ -e /etc/snmp/snmptrapd.options ] && . /etc/snmp/snmptrapd.options +if [ -e /etc/snmp/snmptrapd.options ]; then + . /etc/snmp/snmptrapd.options +else + OPTIONS="-Lsd -p /var/run/snmptrapd.pid" +fi -OPTIONS="-Lsd -p /var/run/snmptrapd.pid" RETVAL=0 prog="snmptrapd"