From owner-freebsd-ports@FreeBSD.ORG Sun May 23 06:54:07 2004 Return-Path: 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 A8D0516A4CF for ; Sun, 23 May 2004 06:54:07 -0700 (PDT) Received: from smtp1.netcologne.de (smtp1.netcologne.de [194.8.194.112]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4395643D46 for ; Sun, 23 May 2004 06:54:07 -0700 (PDT) (envelope-from thomas@laurel.tmseck.homedns.org) Received: from laurel.tmseck.homedns.org (xdsl-213-196-225-250.netcologne.de [213.196.225.250]) by smtp1.netcologne.de (Postfix) with SMTP id 47A3238C9E for ; Sun, 23 May 2004 15:53:55 +0200 (MEST) Received: (qmail 638 invoked by uid 1001); 23 May 2004 13:53:26 -0000 Date: 23 May 2004 13:53:26 -0000 Message-ID: <20040523135326.637.qmail@laurel.tmseck.homedns.org> From: tmseck-lists@netcologne.de (Thomas-Martin Seck) To: Josef Karthauser Organization: a private site in Germany In-Reply-To: <20040523101300.GA43113@genius.tao.org.uk> X-Newsgroups: gmane.os.freebsd.devel.ports X-Attribution: tms cc: freebsd-ports@freebsd.org Subject: Re: portupgrade and daemons. X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 May 2004 13:54:07 -0000 * Josef Karthauser [gmane.os.freebsd.devel.ports]: > A number of ports run daemons, such as postfix, which are started in > /usr/local/tc/rc.d. Portupgrade doesn't appear to know anything about > these, and so it will quite happily attempt to upgrade a daemon that is > still running. Idealally it ought to DTRT, which I guess is some > combination of shutdow the existing port down, upgrade it and then > restart it. There are some rudiments of knowledge about rc.d/ scripts > built into the Mk subsystem so I wonder whether it's possible to hook > into that in some way. Why don't you use portupgrade(1)'s BEFOREDEINSTALL and AFTERINSTALL facilities? I don't think this problem can ever be handled correctly by the port since not everyone likes the idea that a freshly installed daemon is being started automatically without getting a chance to customize the configuration. "Do what I mean" is hard to implement after all...