Gentoo Archives: gentoo-commits

From: "Tiziano Mueller (dev-zero)" <dev-zero@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in app-emulation/libvirt-snmp/files: libvirt-snmp.initd-r1 libvirt-snmp.initd
Date: Tue, 26 Jun 2012 09:34:47
Message-Id: 20120626093435.E63732004C@flycatcher.gentoo.org
dev-zero    12/06/26 09:34:35

  Added:                libvirt-snmp.initd-r1
  Removed:              libvirt-snmp.initd
  Log:
  fix init.d-script to properly stop libvirt-snmp
  
  (Portage version: 2.1.11/cvs/Linux x86_64)

Revision  Changes    Path
1.1                  app-emulation/libvirt-snmp/files/libvirt-snmp.initd-r1

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-emulation/libvirt-snmp/files/libvirt-snmp.initd-r1?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-emulation/libvirt-snmp/files/libvirt-snmp.initd-r1?rev=1.1&content-type=text/plain

Index: libvirt-snmp.initd-r1
===================================================================
#!/sbin/runscript
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-emulation/libvirt-snmp/files/libvirt-snmp.initd-r1,v 1.1 2012/06/26 09:34:35 dev-zero Exp $

depend() {
    need snmpd
    use snmptrapd
    use libvirtd
}

start() {
    ebegin "Starting libvirt subagent"
    start-stop-daemon --start \
        --env LIBVIRT_DEFAULT_URI="${LIBVIRT_DEFAULT_URI}" \
        --exec /usr/bin/libvirtMib_subagent \
        -- ${LIBVIRT_SNMP_OPTIONS}
    eend $?
}

stop() {
    ebegin "Stopping libvirt subagent"
    # "--exec /usr/bin/libvirtMib_subagent" does not work and the name gets truncated
    start-stop-daemon --stop \
        --name libvirtMib_suba
    eend $?
}