Date: Sun, 25 Oct 2009 14:57:38 -0400 From: Michael Powell <nightrecon@hotmail.com> To: freebsd-questions@freebsd.org Subject: Re: incorrect info in mysql docs Message-ID: <hc271b$6lt$1@ger.gmane.org> References: <4AE49717.6020506@onetel.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?hc271b$6lt$1>