From owner-freebsd-current@FreeBSD.ORG Sat Jul 24 15:08:07 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6147B16A4CE; Sat, 24 Jul 2004 15:08:07 +0000 (GMT) Received: from telecom.net.et (ns2.telecom.net.et [213.55.64.38]) by mx1.FreeBSD.org (Postfix) with ESMTP id AE7CF43D58; Sat, 24 Jul 2004 15:08:03 +0000 (GMT) (envelope-from mtm@identd.net) Received: from [213.55.65.33] (HELO pool-151-200-10-97.res.east.verizon.net) by telecom.net.et (CommuniGate Pro SMTP 3.4.8) with ESMTP-TLS id 52523184; Sat, 24 Jul 2004 18:01:20 +0300 Received: from rogue.acs-et.com (localhost [127.0.0.1]) ESMTP id i6OF98JU001417; Sat, 24 Jul 2004 18:09:09 +0300 (EAT) (envelope-from mtm@rogue.acs-et.com) Received: (from mtm@localhost) by rogue.acs-et.com (8.12.11/8.12.11/Submit) id i6OF97pP001416; Sat, 24 Jul 2004 18:09:07 +0300 (EAT) (envelope-from mtm) Date: Sat, 24 Jul 2004 18:09:05 +0300 From: Mike Makonnen To: freebsd-current@freebsd.org Message-ID: <20040724150905.GA998@rogue.acs-et.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.1i X-Operating-System: FreeBSD/5.2-CURRENT (i386) cc: freebsd-ports@freebsd.org Subject: HEADS UP: change in ports rc.d script behaviour X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Jul 2004 15:08:07 -0000 20040724: The rc.d/loclpkg script now "does the right thing" with respect to ports rc.d scripts. The most disruptive change is that scripts ending in *.sh are sourced in the same shell as rc.d/localpkg (as opposed to a subshell) and may cause the script to end prematurely if a script calls exit. Some broken scripts may not recognize the 'fast' prefix to a command. The first problem can be fixed by simply renaming the script so that it doesn't have a '.sh' ending. Another temporary work-arround is to completely remove the 'PROVIDE' line from the script. If you notice a broken ports rc.d script please notify the maintainer. Legacy scripts should not be affected. __FreeBSD_version bumped to 502124. This update to the rc.d/localpkg attempts to normalize the behaviour or ports rc.d scripts with that of the base system scripts. This may break your ports scripts. Please report any breakage to the port's maintainer so the script can be fixed. Ports folks: Some tips on fixing scripts: 1. Use a return statement instead of exit in a '*.sh' script 2. Put the entire current contents of the script in a function and then execute that function in a subshell. For example: foo_script() { does something. } ( foo_script $*) 3. Install the script without a '.sh' ending I know this commit breaks the print/cups port and eik@ has said that the following ports are also broken: audio/daapd databases/pgcluster dns/ez-ipupdate dns/maradns french/plgrenouille mail/dovecot mail/drac mail/elm+ME mail/milter-greylist misc/upclient net-mgmt/net-snmp net/cvsync net/isc-dhcp3-server net/jabberd net/minisapserver net/netatalk-devel net/openslp sysutils/smartmontools sysutils/usermin sysutils/webmin www/apache13 www/apache13+ipv6 www/apache13-modperl www/apache13-modssl www/wwwoffle Cheers. -- Mike Makonnen | GPG-KEY: http://www.identd.net/~mtm/mtm.asc mtm@identd.net | Fingerprint: AC7B 5672 2D11 F4D0 EBF8 5279 5359 2B82 7CD4 1F55 mtm@FreeBSD.Org| FreeBSD - Unleash the Daemon !