Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 24 Jul 2004 18:09:05 +0300
From:      Mike Makonnen <mtm@identd.net>
To:        freebsd-current@freebsd.org
Cc:        freebsd-ports@freebsd.org
Subject:   HEADS UP: change in ports rc.d script behaviour
Message-ID:  <20040724150905.GA998@rogue.acs-et.com>

next in thread | raw e-mail | index | archive | help

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 !



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040724150905.GA998>