--- snmpd.init +++ snmpd.init @@ -1,9 +1,9 @@ #!/sbin/runscript -# Copyright 1999-2009 Gentoo Foundation +# Copyright 1999-2011 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/net-analyzer/net-snmp/files/snmpd.init,v 1.1 2009/10/16 08:51:05 gengor Exp $ -opts="${opts} reload" +extra_started_commands="reload" depend() { use logger @@ -35,13 +35,8 @@ reload() { checkconfig || return 1 - if [ ! -f ${SNMPD_PIDFILE} ]; then - eerror "Cannot reload configuration, ${SVCNAME} is not running" - eend 1 - return 1 - fi ebegin "Reloading ${SVCNAME} configuration" - kill -HUP $(< ${SNMPD_PIDFILE}) &>/dev/null + start-stop-daemon --signal HUP --pidfile ${SNMPD_PIDFILE} eend $? }