From owner-svn-ports-branches@freebsd.org Wed Sep 6 09:26:52 2017 Return-Path: Delivered-To: svn-ports-branches@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A28FFE1CD72; Wed, 6 Sep 2017 09:26:52 +0000 (UTC) (envelope-from mat@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5555B66E52; Wed, 6 Sep 2017 09:26:52 +0000 (UTC) (envelope-from mat@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v869QpmS064846; Wed, 6 Sep 2017 09:26:51 GMT (envelope-from mat@FreeBSD.org) Received: (from mat@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v869QpQ5064844; Wed, 6 Sep 2017 09:26:51 GMT (envelope-from mat@FreeBSD.org) Message-Id: <201709060926.v869QpQ5064844@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mat set sender to mat@FreeBSD.org using -f From: Mathieu Arnold Date: Wed, 6 Sep 2017 09:26:51 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-branches@freebsd.org Subject: svn commit: r449333 - in branches/2017Q3/net-mgmt/nrpe: . files X-SVN-Group: ports-branches X-SVN-Commit-Author: mat X-SVN-Commit-Paths: in branches/2017Q3/net-mgmt/nrpe: . files X-SVN-Commit-Revision: 449333 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-branches@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the branches of the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Sep 2017 09:26:53 -0000 Author: mat Date: Wed Sep 6 09:26:51 2017 New Revision: 449333 URL: https://svnweb.freebsd.org/changeset/ports/449333 Log: MFH: r449332 Fix not starting after crash. When nrpe quits ungracefully, for example, if the box was rebooted, it often does not start because the pid file is still there, and the pid in it exists and the pid in it is in use by some other process. The dubious code is in src/nrpe.c in write_pid_file() around line 1756 that could be axed. But I think the easiest way to fix this is with the attached patch. precmd is run just before starting the daemon and after checking that it is not already running. With this, it starts just fine, and still refuses to start if it is really already running, but starts fine if the pid file contains a pid that exists but is not nrpe. PR: 221740 Submitted by: mat Approved by: maintainer timeout, ports-secteam blanket Sponsored by: Absolight Modified: branches/2017Q3/net-mgmt/nrpe/Makefile branches/2017Q3/net-mgmt/nrpe/files/nrpe2.in Directory Properties: branches/2017Q3/ (props changed) Modified: branches/2017Q3/net-mgmt/nrpe/Makefile ============================================================================== --- branches/2017Q3/net-mgmt/nrpe/Makefile Wed Sep 6 09:24:10 2017 (r449332) +++ branches/2017Q3/net-mgmt/nrpe/Makefile Wed Sep 6 09:26:51 2017 (r449333) @@ -3,7 +3,7 @@ PORTNAME= nrpe DISTVERSION= 2.15 -PORTREVISION= 6 +PORTREVISION= 7 CATEGORIES= net-mgmt MASTER_SITES= SF/nagios/${PORTNAME}-2.x/${PORTNAME}-${PORTVERSION} Modified: branches/2017Q3/net-mgmt/nrpe/files/nrpe2.in ============================================================================== --- branches/2017Q3/net-mgmt/nrpe/files/nrpe2.in Wed Sep 6 09:24:10 2017 (r449332) +++ branches/2017Q3/net-mgmt/nrpe/files/nrpe2.in Wed Sep 6 09:26:51 2017 (r449333) @@ -48,6 +48,7 @@ nrpe2_prestart() { find_pidfile install -d -o ${nrpe_user:-nagios} ${pidfile%/*} + rm -f ${pidfile} } run_rc_command "$1"