From owner-freebsd-ports@FreeBSD.ORG Sat Nov 4 04:18:12 2006 Return-Path: X-Original-To: ports@freebsd.org Delivered-To: freebsd-ports@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BF15F16A407; Sat, 4 Nov 2006 04:18:12 +0000 (UTC) (envelope-from bseklecki@collaborativefusion.com) Received: from mx02.pub.collaborativefusion.com (mx02.pub.collaborativefusion.com [206.210.72.73]) by mx1.FreeBSD.org (Postfix) with ESMTP id 36EC243D58; Sat, 4 Nov 2006 04:18:12 +0000 (GMT) (envelope-from bseklecki@collaborativefusion.com) Received: from soundwave.pgh.priv.collaborativefusion.com (pr40.pitbpa0.pub.collaborativefusion.com [206.210.89.202]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) (Authenticated sender: seklecki) by mx02.pub.collaborativefusion.com (Postfix) with ESMTP id 0675BAC826; Fri, 3 Nov 2006 23:18:01 -0500 (EST) From: "Brian A. Seklecki" To: ports@freebsd.org, nork@freebsd.org Content-Type: multipart/mixed; boundary="=-o4PWBoQMgLCxFMY6c2wn" Organization: Collaborative Fusion, Inc. Date: Fri, 03 Nov 2006 23:18:11 -0500 Message-Id: <1162613891.26675.315.camel@soundwave.pgh.priv.collaborativefusion.com> Mime-Version: 1.0 X-Mailer: Evolution 2.6.3 FreeBSD GNOME Team Port Cc: Subject: $snmpd_flush_cache for Net-SNMP ports/net-mgmt/net-snmp/files/snmpd.sh.in X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Nov 2006 04:18:12 -0000 --=-o4PWBoQMgLCxFMY6c2wn Content-Type: text/plain Content-Transfer-Encoding: 7bit FYI to SNMP hackers. Objections to this patch? -- Brian A. Seklecki Collaborative Fusion, Inc. --=-o4PWBoQMgLCxFMY6c2wn Content-Disposition: inline Content-Description: Forwarded message - $snmpd_flush_cache for Net-SNMP ports/net-mgmt/net-snmp/files/snmpd.sh.in ? Content-Type: message/rfc822 Subject: $snmpd_flush_cache for Net-SNMP ports/net-mgmt/net-snmp/files/snmpd.sh.in ? From: "Brian A. Seklecki" To: nork@freebsd.org Cc: lavalamp@spiritual-machines.org Content-Type: text/plain Organization: Collaborative Fusion, Inc. Message-Id: <1159542081.82946.76.camel@soundwave.pgh.priv.collaborativefusion.com> Mime-Version: 1.0 X-Mailer: Evolution 2.6.3 FreeBSD GNOME Team Port Date: Fri, 29 Sep 2006 11:01:21 -0400 Content-Transfer-Encoding: 7bit Good call on the $snmpd_pidfile= Another useful flag would be an optional pre_start() to blow away the Exec cache (which lingers after the process dies without documentation) Basically if you're writing a lot of your own passthrough OIDs and one of them fails to exec, a simple restart of SNMP should be enough to flush out: +start_precmd=snmpd_precmd +snmpd_precmd () { + if checkyesno snmpd_flush_cache; then + rm -rvf /var/net-snmp/.snmp-exec-cache fi ~BAS -- Brian A. Seklecki Collaborative Fusion, Inc. --=-o4PWBoQMgLCxFMY6c2wn--