From owner-freebsd-questions@FreeBSD.ORG Sun Oct 25 18:57:08 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7C3BD106566B for ; Sun, 25 Oct 2009 18:57:08 +0000 (UTC) (envelope-from freebsd-questions@m.gmane.org) Received: from lo.gmane.org (lo.gmane.org [80.91.229.12]) by mx1.freebsd.org (Postfix) with ESMTP id 089558FC12 for ; Sun, 25 Oct 2009 18:57:07 +0000 (UTC) Received: from list by lo.gmane.org with local (Exim 4.50) id 1N28H4-0003ms-EL for freebsd-questions@freebsd.org; Sun, 25 Oct 2009 19:57:06 +0100 Received: from pool-72-75-59-184.washdc.east.verizon.net ([72.75.59.184]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 25 Oct 2009 19:57:06 +0100 Received: from nightrecon by pool-72-75-59-184.washdc.east.verizon.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 25 Oct 2009 19:57:06 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-questions@freebsd.org From: Michael Powell Followup-To: gmane.os.freebsd.questions Date: Sun, 25 Oct 2009 14:57:38 -0400 Lines: 45 Message-ID: References: <4AE49717.6020506@onetel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7Bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: pool-72-75-59-184.washdc.east.verizon.net Sender: news Subject: Re: incorrect info in mysql docs X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Oct 2009 18:57:08 -0000 Chris Whitehouse wrote: > hi, > > I just noticed this at > http://dev.mysql.com/doc/refman/5.1/en/automatic-start.html > > On FreeBSD, startup scripts generally should go in /usr/local/etc/rc.d/. > The rc(8) manual page states that scripts in this directory are executed > only if their basename matches the *.sh shell file name pattern. Any > other files or directories present within the directory are silently > ignored. In other words, on FreeBSD, you should install the mysql.server > script as /usr/local/etc/rc.d/mysql.server.sh to enable automatic startup. That was before the import of the rc.subr subsystem from NetBSD. Sounds like the docs may be a trifle stale. > That's not actually right is it? My mysql is started by > /usr/local/etc/rc.d/mysql-server. rc(8) says *.sh is for older style > startup scripts or for scripts that are to be read into the current shell. > The rc.subr start up system was imported from NetBSD quite some time ago, I think it might have been sometime around the 6.0 to 6.2 time frame. I know this bit me because I had mostly not bothered with executing mergemaster during updates and at some point only scripts with the .sh extension would run. When others told me they did not experience this I got to looking for the culprit and it was that I had failed to update the /etc/rc.d properly with mergemaster to bring in the newly imported rc.subr subsystem. Before the rc.subr import from NetBSD the .sh extension was correct; some other OS's call these "legacy" start up scripts. After the rc.subr import the .sh extension is no longer required for scripts that are written in compliance to the new spec. If you examine a very old start up script from the pre rc.subr days and what is currently in use you will see a slight difference in the way the scripts are constructed internally. The .sh extension "legacy" scripts may still run if marked as executable, but the difference is that they do not contain the rc.subr hooks, and therefore will require the .sh extension for operation, as per the man page you described above. -Mike