From owner-freebsd-ports@FreeBSD.ORG Thu Oct 27 15:10:58 2011 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 10317106567D for ; Thu, 27 Oct 2011 15:10:58 +0000 (UTC) (envelope-from thomas@gibfest.dk) Received: from mail.tyknet.dk (mail.tyknet.dk [IPv6:2a01:4f8:141:52a3:186::]) by mx1.freebsd.org (Postfix) with ESMTP id 99C0D8FC18 for ; Thu, 27 Oct 2011 15:10:57 +0000 (UTC) Received: from tykburk.tyknet.cn.dom (unknown [IPv6:2002:d947:452:1:224:8cff:fe02:de01]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mail.tyknet.dk (Postfix) with ESMTPSA id 9169276F0C for ; Thu, 27 Oct 2011 17:10:55 +0200 (CEST) X-DKIM: OpenDKIM Filter v2.4.1 mail.tyknet.dk 9169276F0C DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=gibfest.dk; s=default; t=1319728256; bh=mmqzuexf2LJXTVWF3PCauzO7TLDAdSvCylmhiXUoXsc=; h=Message-ID:Date:From:MIME-Version:To:Subject:References: In-Reply-To:Content-Type:Content-Transfer-Encoding; b=IsI0CwDLQC8PfufZ1U5iFCMqbP8b7yRyTz3CyuhJlyyNwJVqQFmvLK1NeJfcK4IzX XhW+q8Q1aLoKXV51qPYnZQU9pQJgWhgwBzFoSBiM68ieJ+lT1/+o6x+pycPLG2wxlh DF6t/VjHRAJ07cj/9zh+mwal0V2XkOnlkSW+k88Q= Message-ID: <4EA97479.7080903@gibfest.dk> Date: Thu, 27 Oct 2011 17:10:49 +0200 From: Thomas Steen Rasmussen User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:7.0.1) Gecko/20111014 Thunderbird/7.0.1 MIME-Version: 1.0 To: freebsd-ports@freebsd.org References: <20111027091500.GM63910@hoeg.nl> <20111027130458.GD2934@atarininja.org> In-Reply-To: <20111027130458.GD2934@atarininja.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: ports/162049: The Ports tree lacks a framework to restart services 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: Thu, 27 Oct 2011 15:10:58 -0000 On 27.10.2011 15:04, Wesley Shields wrote: > > I agree inconsistency is a problem that could be addressed, but I don't > particularly agree with some of your statements. > Consistency is important, and I agree with Wesley that we should consistently "do nothing", instead of consistently stopping/starting daemons. > >> - If I upgrade Dovecot, it shuts it down during the upgrade, but won't >> restart it. This means that I have to watch portmaster to complete and >> must not forget to restart Dovecot afterwards. > Unless it is absolutely necessary to stop and restart dovecot during an > upgrade I would like to see this removed. I have a hard time imagining a situation where this is the case, and again I agree with Wesley, I would also like to see it removed. The dovecot stopping thing has bitten me more than once. > >> My question is whether anyone has ever attempted to improve the >> integration with rc-scripts? In the PR I propose something along these >> lines: >> >> We know exactly which ports install rc scripts (USE_RC_SUBR). >> Why not run `/usr/local/etc/rc.d/${FOO} status' and >> `/usr/local/etc/rc.d/${FOO} stop' prior to installation. Based >> on the return value of the first, we can run >> `/usr/local/etc/rc.d/${FOO} start' after installation. This can fail in so many unexpected ways that IMO it is much better to do nothing at all, and leave it up to the sysadmin to decide when to restart the daemon. If anything like this is needed, perhaps we could add a message after upgrading a port which installs an RC script, mentioning that the sysadmin needs to restart the daemon manually (whenever appropriate) in order to run the new version. Best regards, Thomas Steen Rasmussen