[COLUG] /usr/local/etc/rc.d/init.d - Huh?
Mike Schoenborn
rtfm at columbus.rr.com
Sat Jan 13 00:31:30 EST 2007
At 06:21 PM 1/11/2007 -0500, Tom Hanlon wrote:
>I picture that part of the script that builds this package takes a file
>hierarchy and appends "PATH" (usr/local) to it.
Yup. Here are the defaults at the top of the Makefile...
prefix = /usr/local
prefix2 = $(prefix)
BIN = $(prefix)/bin
SBIN = $(prefix)/sbin
SCRIPTDIR = $(prefix)/share/ncid
ETC = $(prefix2)/etc
ROTATE = $(ETC)/logrotate.d
INIT = $(ETC)/rc.d/init.d
CONFDIR = $(ETC)/ncid
MAN = $(prefix)/share/man
>That should be appended to everythiing but the init script. I see this
>as an easy mistake to make.
Mind you this Makefile is ambitiously trying to cover many platforms...
########################################################################
# make local - builds for /usr/local and /var #
# make install - installs files in /usr/local and /var #
# make package - builds for /usr, /etc, and /var #
# make install-package - installs files in /usr, /etc, and /var #
# make mandir - builds man text and html files #
# (no install for the *.txt and *.html files) #
# #
# make tivo-series1 - builds for a ppc TiVo for /var/hack #
# make tivo-series2 - builds for a mips TiVo for /var/hack #
# uses the cross compilers at: http://tivoutils.sourceforge.net/ #
# usr.local.powerpc-tivo.tar.bz2 (x86 cross compiler for Series1) #
# usr.local.mips-tivo.tar.bz2 (x86 cross compiler for Series2) #
# #
# gmake freebsd - builds for FreeBSD in /usr/local #
# gmake install-freebsd - installs in /usr/local #
# #
# make mac - builds for Macintosh OS X in /usr/local #
# make install-mac - installs in /usr/local #
# #
# make cygwin - builds for Windows using cygwin #
# (does not function with modem or comm port) #
# make install-cygwin - installs files in /usr/local, and /var #
########################################################################
...so perhaps a screw up or two can be forgiven.
(fyi, "make package" sets "prefix2=" blank, with the result that the
init scripts end up in a more "normal" place.)
>Isn't the rule something like...
>"Never attribute to malice that which can be explained as incompetence "
I preach that one myself, so I agree it might just be a simple
mistake. But there are a (Very) few (Googled) hints that others are
using the /usr/local/etc/rc.d/init.d directory as well. For instance,
the SmartMon package (http://smartmontools.sourceforge.net) has install
directions which show the suggested options for ./configure for a number
of different scenerios...
[3] Installing from the source tarball --with-initscriptdir=/usr/local/etc/rc.d/init.d
...
[4] Guidelines for different Linux distributions
Debian (no options for ./configure, so see [13] below)
Filesystem Hierarchy Standard --with-initscriptdir=/usr/local/etc/rc.d/init.d
Red Hat --with-initscriptdir=/etc/rc.d/init.d
Slackware --with-initscriptdir=/etc/rc.d
SuSE --with-initscriptdir=/etc/init.d
...
[5] Guidelines for FreeBSD --with-initscriptdir=/usr/local/etc/rc.d
...
[6] Guidelines for Darwin --with-initscriptdir=/Library/StartupItems
...
[8] Guidelines for Solaris --with-initscriptdir=/etc/init.d
...
[9] Guidelines for Cygwin --with-initscriptdir=/etc/rc.d/init.d
...
[12] Guidelines for OpenBSD --with-initscriptdir=/usr/local/share/doc/smartmontools-VERSION
...
[13] Comments
The following files are installed if ./configure has no options:
...
/usr/local/etc/rc.d/init.d/smartd [Init/Startup script for smartd]
(Should FHS be considered a "distribution"?)
I was hoping to learn something new here, perhaps that the usage of
/usr/local/etc/rc.d/init.d was bleeding edge.
Now I'm thinking it's just bleeding.
More information about the colug432
mailing list