[Orca-checkins] rev 189 - in trunk/orca: . orca contrib lib data_gatherers data_gatherers/orcallator data_gatherers/orca_services

blair at orcaware.com blair at orcaware.com
Mon Jan 6 18:02:56 PST 2003


Author: blair
Date: 2003-01-06 18:02:43 -0800 (Mon, 06 Jan 2003)
New Revision: 189

Modified:
   trunk/orca/Makefile.in
   trunk/orca/contrib/Makefile.in
   trunk/orca/data_gatherers/Makefile.in
   trunk/orca/data_gatherers/orca_services/Makefile.in
   trunk/orca/data_gatherers/orca_services/README
   trunk/orca/data_gatherers/orca_services/start_orca_services.sh.in
   trunk/orca/data_gatherers/orca_services/stop_orca_services.sh.in
   trunk/orca/data_gatherers/orcallator/Makefile.in
   trunk/orca/data_gatherers/orcallator/start_orcallator.sh.in
   trunk/orca/lib/Makefile.in
   trunk/orca/orca/Makefile.in
Log:
When installing Orca, be more consistent where things are installed.
For reference, here are the default values of the variables used in
configure and the Makefile.in's:

  Variable name                 Default setting
  -------------------------------------------------------
  $prefix                       /usr/local
  $exec_prefix                  $prefix
  $bindir                       $exec_prefix/bin
  $libdir                       $exec_prefix/lib
  $libexecdir                   $exec_prefix/libexec
  $sysconfdir                   $prefix/etc

Here are the old and new locations of files:

  Old location                  New location
  -------------------------------------------------------
  $bindir/orca_services.pl      $libexecdir/orca_services
  $bindir/S99orcallator         no longer installed
  $bindir/S99orca_services      no longer installed
  $bindir/upgrade_installation  no longer installed
  $libdir/orcallator.cfg        $sysconfdir/orcallator.cfg
  $libdir/orca_services.cfg     $sysconfdir/orca_services.cfg
  $libdir/orca_services.pl      no longer installed, as it's in $bindir already

Also, distinguish between where VAR_DIR and RRD_DIR is used.  VAR_DIR
is the base directory for the raw orcallator and orca_services output
files and RRD_DIR is the base directory where the RRD files are kept.

* Makefile.in
  (orca_services_run_at_boot): New rule to descend into
    data_gatherers/orca_services and install orca_services to run at
    boot time.
  (install): No longer mkdir any directories, let the subdirectories
    do that.  This allows `make install' in subdirectories to properly
    mkdir all the directories so that the install goes smoothly.

* orca/Makefile.in,
* data_gatherers/orca_services/Makefile.in,
* data_gatherers/orcallator/Makefile.in:
  Permit more general handling of where to install Perl and shell
    scripts.  This has the feel of automake's variables.
  (BIN_PERL_SCRIPTS, LIBEXEC_PERL_SCRIPTS, NOINST_PERL_SCRIPTS): New
    variables that specify where the Perl scripts are installed.
    $(PERL_SCRIPTS) is now the concatenation of these three variables.
  (BIN_SHELL_SCRIPTS, LIBEXEC_SHELL_SCRIPTS, NOINST_SHELL_SCRIPTS):
    New variables that specify where the shell scripts are installed.
    $(SHELL_SCRIPTS) is now the concatenation of these three
    variables.
  (BIN_TARGETS): New variable, concatenation of $(BIN_PERL_SCRIPTS)
    and $(BIN_SHELL_SCRIPTS).
  (LIBEXEC_TARGETS): New variable, concatenation of
    $(LIBEXEC_PERL_SCRIPTS) and $(LIBEXEC_SHELL_SCRIPTS).
  (install): Install $(BIN_TARGETS) into $bindir and
    $(LIBEXEC_TARGETS) to $libexecdir.

* orca/Makefile.in:
  (RAW_ORCALLATOR_DIR): Renamed from ORCALLATOR_DIR.

* data_gatherers/Makefile.in
  Spacing changes to be consistent with our Makefile.in's.
  (orcallator_run_at_boot): New rule to descend into orcallator and
    install orcallator to run at boot time.
  (orca_services_run_at_boot): New rule to descend into
    orca_services and install orca_services to run at boot time.

* data_gatherers/orca_services/Makefile.in,
* data_gatherers/orcallator/Makefile.in,
  (install): Build and install all the files and directories as listed
    in the table above.
  (orca_services_run_at_boot): Use $(INIT_D_DIR) and
    $(RCX_D_CONTAINING_DIR) instead of hardwired /etc/init.d and
    /etc/rcX.d to install the boot files.  Ensure that $(INIT_D_DIR)
    and $(RCX_D_CONTAINING_DIR) are set before installing the boot
    scripts.  Fix a typo that would always cause the test for
    $(RCX_D_CONTAINING_DIR) to pass.

* data_gatherers/orca_services/Makefile.in
  (orca_services.pl): Create using just config.status.  Let the rest
    of the steps that used to create orca_services.pl be used by the
    .pl: rule.

* data_gatherers/orca_services/README,
* data_gatherers/orca_services/stop_orca_services.sh.in:
  s/orca_services.pl/orca_services/g.

* data_gatherers/orca_services/start_orca_services.sh.in:
  Look for the host specific arguments to orca_services in $sysconfdir
    not $libdir.
  Run orca_services out of $libexecdir, not $libdir.
  s/orca_services.pl/orca_services/g.
  (RAW_ORCA_SERVICES_DIR): Renamed from ORCA_SERVICES_DIR.
  Write the orca_services.pid file out to be consistent with
    orcallator.  No telling who may need it.

* data_gatherers/orcallator/start_orcallator.sh.in:
  (RAW_ORCALLATOR_DIR): Renamed from ORCALLATOR_DIR.

* contrib/Makefile.in,
  lib/Makefile.in:
  Spacing changes to be consistent with our Makefile.in's.


Modified: trunk/orca/Makefile.in
==============================================================================
--- trunk/orca/Makefile.in	(original)
+++ trunk/orca/Makefile.in	2003-01-06 18:02:55.000000000 -0800
@@ -2,10 +2,6 @@
 
 prefix            = @prefix@
 MKDIR             = @MKDIR@
-MAKE_RRDTOOL      = @MAKE_RRDTOOL@
-RRD_DIR           = @RRD_DIR@
-VAR_DIR           = @VAR_DIR@
-ORCALLATOR_DIR    = $(VAR_DIR)/orcallator
 CFLAGS            = @CFLAGS@
 
 SUBDIRS           = packages \
@@ -34,10 +30,7 @@
 upgrade:
 	cd src && $(MAKE) upgrade_installation
 
-install: $(INSTALL_RRDTOOL)
-	$(MKDIR) $(VAR_DIR)
-	$(MKDIR) $(ORCALLATOR_DIR)
-	$(MKDIR) $(RRD_DIR)/orcallator
+install:
 	@for dir in $(SUBDIRS); do \
 	  if test -d $$dir; then \
 	    echo "cd $$dir"; \
@@ -57,19 +50,22 @@
 orcallator_run_at_boot:
 	cd data_gatherers/orcallator && $(MAKE) orcallator_run_at_boot
 
+orca_services_run_at_boot:
+	cd data_gatherers/orca_services && $(MAKE) orca_services_run_at_boot
+
 test_modules:
 	cd packages && $(MAKE) CFLAGS="$(CFLAGS)" test_modules
 
 install_modules:
 	cd packages && $(MAKE) CFLAGS="$(CFLAGS)" install_modules
 
-clean:	$(CLEAN_RRDTOOL)
+clean:
 	@for dir in $(SUBDIRS); do \
 	  echo "cd $$dir && $(MAKE) clean"; \
 	  (cd $$dir && $(MAKE) clean); \
 	done
 
-distclean: $(DISTCLEAN_RRDTOOL)
+distclean:
 	@for dir in $(SUBDIRS); do \
 	  echo "cd $$dir && $(MAKE) distclean"; \
 	  (cd $$dir && $(MAKE) distclean); \

Modified: trunk/orca/orca/Makefile.in
==============================================================================
--- trunk/orca/orca/Makefile.in	(original)
+++ trunk/orca/orca/Makefile.in	2003-01-06 18:02:55.000000000 -0800
@@ -1,30 +1,53 @@
 @SET_MAKE@
 
-prefix            = @prefix@
-exec_prefix       = @exec_prefix@
-bindir            = @bindir@
-INSTALL           = @INSTALL@
-MKDIR             = @MKDIR@
-PERL_HEAD         = @PERL_HEAD@
-RRD_DIR           = @RRD_DIR@
-VAR_DIR           = @VAR_DIR@
-ORCALLATOR_DIR    = $(VAR_DIR)/orcallator
-PERL_SCRIPTS      = orca \
-                    upgrade_installation
-SHELL_SCRIPTS     =
-TARGETS           = $(PERL_SCRIPTS) $(SHELL_SCRIPTS)
+prefix                = @prefix@
+exec_prefix           = @exec_prefix@
+bindir                = @bindir@
+INSTALL               = @INSTALL@
+MKDIR                 = @MKDIR@
+PERL_HEAD             = @PERL_HEAD@
+RRD_DIR               = @RRD_DIR@
+VAR_DIR               = @VAR_DIR@
+RAW_ORCALLATOR_DIR    = $(VAR_DIR)/orcallator
+
+BIN_PERL_SCRIPTS      = orca
+LIBEXEC_PERL_SCRIPTS  =
+NOINST_PERL_SCRIPTS   = upgrade_installation
+PERL_SCRIPTS          = $(BIN_PERL_SCRIPTS) \
+                        $(LIBEXEC_PERL_SCRIPTS) \
+                        $(NOINST_PERL_SCRIPTS)
+
+BIN_SHELL_SCRIPTS     =
+LIBEXEC_SHELL_SCRIPTS =
+NOINST_SHELL_SCRIPTS  =
+SHELL_SCRIPTS         = $(BIN_SHELL_SCRIPTS) \
+                        $(LIBEXEC_SHELL_SCRIPTS) \
+                        $(NOINST_SHELL_SCRIPTS)
+
+TARGETS               = $(PERL_SCRIPTS) \
+                        $(SHELL_SCRIPTS)
+BIN_TARGETS           = $(BIN_PERL_SCRIPTS) \
+                        $(BIN_SHELL_SCRIPTS)
+LIBEXEC_TARGETS       = $(LIBEXEC_PERL_SCRIPTS) \
+                        $(LIBEXEC_SHELL_SCRIPTS)
 
 all: Makefile $(TARGETS)
 
 install: all
 	$(MKDIR) $(bindir)
-	@for file in $(TARGETS); do \
+	@for file in $(BIN_TARGETS); do \
 	  echo $(INSTALL) $$file $(bindir); \
 	  $(INSTALL) $$file $(bindir); \
 	done
 
 upgrade: upgrade_installation
-	./upgrade_installation $(prefix) $(exec_prefix) $(bindir) $(libdir) $(ORCALLATOR_DIR) $(RRD_DIR)
+	./upgrade_installation \
+	  $(prefix) \
+	  $(exec_prefix) \
+	  $(bindir) \
+	  $(libdir) \
+	  $(RAW_ORCALLATOR_DIR) \
+	  $(RRD_DIR)
 
 clean:
 	$(RM) $(TARGETS)

Modified: trunk/orca/contrib/Makefile.in
==============================================================================
--- trunk/orca/contrib/Makefile.in	(original)
+++ trunk/orca/contrib/Makefile.in	2003-01-06 18:02:55.000000000 -0800
@@ -1,6 +1,6 @@
 @SET_MAKE@
 
-SUBDIRS           = rotate_orca_graphs
+SUBDIRS               = rotate_orca_graphs
 
 all:	Makefile $(TARGETS)
 	@for dir in $(SUBDIRS); do \

Modified: trunk/orca/lib/Makefile.in
==============================================================================
--- trunk/orca/lib/Makefile.in	(original)
+++ trunk/orca/lib/Makefile.in	2003-01-06 18:02:55.000000000 -0800
@@ -1,10 +1,10 @@
 @SET_MAKE@
 
-prefix            = @prefix@
-exec_prefix       = @exec_prefix@
-libdir            = @libdir@
-INSTALL           = @INSTALL@
-MKDIR             = @MKDIR@
+prefix                = @prefix@
+exec_prefix           = @exec_prefix@
+libdir                = @libdir@
+INSTALL               = @INSTALL@
+MKDIR                 = @MKDIR@
 
 all: Makefile \
      orca_logo.gif.hex \

Modified: trunk/orca/data_gatherers/orcallator/Makefile.in
==============================================================================
--- trunk/orca/data_gatherers/orcallator/Makefile.in	(original)
+++ trunk/orca/data_gatherers/orcallator/Makefile.in	2003-01-06 18:02:55.000000000 -0800
@@ -1,46 +1,74 @@
 @SET_MAKE@
 
-prefix            = @prefix@
-exec_prefix       = @exec_prefix@
-bindir            = @bindir@
-libdir            = @libdir@
-INSTALL           = @INSTALL@
-MKDIR             = @MKDIR@
-PERL_HEAD         = @PERL_HEAD@
-VAR_DIR           = @VAR_DIR@
-RRD_DIR           = @RRD_DIR@
-RRDTOOL_DIR       = @RRDTOOL_DIR@
-ORCALLATOR_DIR    = $(VAR_DIR)/orcallator
-PERL_SCRIPTS      = orcallator_column \
-                    orcallator_running
-SHELL_SCRIPTS     = restart_orcallator \
-                    stop_orcallator \
-                    start_orcallator \
-                    S99orcallator
-TARGETS           = $(PERL_SCRIPTS) $(SHELL_SCRIPTS)
+prefix                = @prefix@
+exec_prefix           = @exec_prefix@
+bindir                = @bindir@
+libdir                = @libdir@
+libexecdir            = @libexecdir@
+sysconfdir            = @sysconfdir@
+INSTALL               = @INSTALL@
+MKDIR                 = @MKDIR@
+PERL_HEAD             = @PERL_HEAD@
+VAR_DIR               = @VAR_DIR@
+RRD_DIR               = @RRD_DIR@
+INIT_D_DIR            = @INIT_D_DIR@
+RCX_D_CONTAINING_DIR  = @RCX_D_CONTAINING_DIR@
+RAW_ORCALLATOR_DIR    = $(VAR_DIR)/orcallator
+RRD_ORCALLATOR_DIR    = $(RRD_DIR)/orcallator
+
+BIN_PERL_SCRIPTS      = orcallator_column \
+                        orcallator_running
+LIBEXEC_PERL_SCRIPTS  =
+NOINST_PERL_SCRIPTS   =
+PERL_SCRIPTS          = $(BIN_PERL_SCRIPTS) \
+                        $(LIBEXEC_PERL_SCRIPTS) \
+                        $(NOINST_PERL_SCRIPTS)
+
+BIN_SHELL_SCRIPTS     = restart_orcallator \
+                        stop_orcallator \
+                        start_orcallator
+LIBEXEC_SHELL_SCRIPTS =
+NOINST_SHELL_SCRIPTS  = S99orcallator
+SHELL_SCRIPTS         = $(BIN_SHELL_SCRIPTS) \
+                        $(LIBEXEC_SHELL_SCRIPTS) \
+                        $(NOINST_SHELL_SCRIPTS)
+
+TARGETS               = $(PERL_SCRIPTS) \
+                        $(SHELL_SCRIPTS)
+BIN_TARGETS           = $(BIN_PERL_SCRIPTS) \
+                        $(BIN_SHELL_SCRIPTS)
+LIBEXEC_TARGETS       = $(LIBEXEC_PERL_SCRIPTS) \
+                        $(LIBEXEC_SHELL_SCRIPTS)
 
 all: Makefile $(TARGETS) orcallator.cfg
 
 install: all
 	$(MKDIR) $(bindir)
 	$(MKDIR) $(libdir)
-	@for file in $(TARGETS); do \
+	$(MKDIR) $(sysconfdir)
+	$(MKDIR) $(RAW_ORCALLATOR_DIR)
+	$(MKDIR) $(RRD_ORCALLATOR_DIR)
+	@for file in $(BIN_TARGETS); do \
 	  echo $(INSTALL) $$file $(bindir); \
 	  $(INSTALL) $$file $(bindir); \
 	done
-	if test -r $(libdir)/orcallator.cfg; then \
-	  cp -p $(libdir)/orcallator.cfg $(libdir)/orcallator.cfg.`date +%Y-%m-%d-%H:%M:%S`; \
-	fi
-	$(INSTALL) -m 0644 orcallator.cfg $(libdir)
 	$(INSTALL) -m 0644 orcallator.se $(libdir)
+	if test -r $(sysconfdir)/orcallator.cfg; then \
+	  cp -p $(sysconfdir)/orcallator.cfg $(sysconfdir)/orcallator.cfg.`date +%Y-%m-%d-%H:%M:%S`; \
+	fi
+	$(INSTALL) -m 0644 orcallator.cfg $(sysconfdir)
 
 orcallator_run_at_boot: all
-	-$(RM) /etc/init.d/orcallator /etc/rc0.d/K01orcallator
-	-$(RM) /etc/rc1.d/K01orcallator /etc/rc3.d/S99orcallator
-	$(INSTALL) -m 0744 S99orcallator /etc/init.d/orcallator
-	ln /etc/init.d/orcallator /etc/rc0.d/K01orcallator
-	ln /etc/init.d/orcallator /etc/rc1.d/K01orcallator
-	ln /etc/init.d/orcallator /etc/rc3.d/S99orcallator
+	test "$(INIT_D_DIR)"
+	test "$(RCX_D_CONTAINING_DIR)"
+	-$(RM) $(INIT_D_DIR)/orcallator
+	-$(RM) $(RCX_D_CONTAINING_DIR)/rc0.d/K01orcallator
+	-$(RM) $(RCX_D_CONTAINING_DIR)/rc1.d/K01orcallator
+	-$(RM) $(RCX_D_CONTAINING_DIR)/rc3.d/S99orcallator
+	$(INSTALL) -m 0744 S99orcallator $(INIT_D_DIR)/orcallator
+	ln $(INIT_D_DIR)/orcallator $(RCX_D_CONTAINING_DIR)/rc0.d/K01orcallator
+	ln $(INIT_D_DIR)/orcallator $(RCX_D_CONTAINING_DIR)/rc1.d/K01orcallator
+	ln $(INIT_D_DIR)/orcallator $(RCX_D_CONTAINING_DIR)/rc3.d/S99orcallator
 
 clean:
 	$(RM) $(TARGETS)

Modified: trunk/orca/data_gatherers/orcallator/start_orcallator.sh.in
==============================================================================
--- trunk/orca/data_gatherers/orcallator/start_orcallator.sh.in	(original)
+++ trunk/orca/data_gatherers/orcallator/start_orcallator.sh.in	2003-01-06 18:02:55.000000000 -0800
@@ -11,7 +11,7 @@
 CUT=@CUT@
 EXPR=@EXPR@
 UNAME=@UNAME@
-ORCALLATOR_DIR=@VAR_DIR@/orcallator
+RAW_ORCALLATOR_DIR=@VAR_DIR@/orcallator
 SE=@SE@
 
 # WEB_LOG contains the location of the web server log file that
@@ -69,8 +69,8 @@
   exit 1
 fi
 
-# The directory these files go into is $ORCALLATOR_DIR/HOSTNAME
-OUTDIR=$ORCALLATOR_DIR/$uname
+# The directory these files go into is $RAW_ORCALLATOR_DIR/HOSTNAME
+OUTDIR=$RAW_ORCALLATOR_DIR/$uname
 
 # Export the environmental variables.
 export COMPRESSOR OUTDIR WEB_LOG WEB_SERVER WEB_SERVER_SECURE
@@ -109,5 +109,6 @@
 pid=$!
 echo $pid > $OUTDIR/orcallator.pid
 
-# Sleep for a couple of seconds to allow any orcallator warnings to appear.
+# Sleep for a couple of seconds to allow any orcallator startup
+# warnings to appear on the terminal before exiting.
 sleep 5

Modified: trunk/orca/data_gatherers/Makefile.in
==============================================================================
--- trunk/orca/data_gatherers/Makefile.in	(original)
+++ trunk/orca/data_gatherers/Makefile.in	2003-01-06 18:02:56.000000000 -0800
@@ -1,7 +1,7 @@
 @SET_MAKE@
 
-SUBDIRS           = orcallator \
-                    orca_services
+SUBDIRS               = orcallator \
+                        orca_services
 
 all:	Makefile $(TARGETS)
 	@for dir in $(SUBDIRS); do \
@@ -9,6 +9,12 @@
 	  (cd $$dir && $(MAKE) CFLAGS="$(CFLAGS)"); \
 	done
 
+orcallator_run_at_boot:
+	cd orcallator && $(MAKE) orcallator_run_at_boot
+
+orca_services_run_at_boot:
+	cd orca_services && $(MAKE) orca_services_run_at_boot
+
 install:
 	@for dir in $(SUBDIRS); do \
 	  echo "cd $$dir && $(MAKE) CFLAGS=$(CFLAGS) install"; \

Modified: trunk/orca/data_gatherers/orca_services/Makefile.in
==============================================================================
--- trunk/orca/data_gatherers/orca_services/Makefile.in	(original)
+++ trunk/orca/data_gatherers/orca_services/Makefile.in	2003-01-06 18:02:56.000000000 -0800
@@ -1,47 +1,76 @@
 @SET_MAKE@
 
-prefix            = @prefix@
-exec_prefix       = @exec_prefix@
-bindir            = @bindir@
-libdir            = @libdir@
-INSTALL           = @INSTALL@
-MKDIR             = @MKDIR@
-PERL_HEAD         = @PERL_HEAD@
-VAR_DIR           = @VAR_DIR@
-RRD_DIR           = @RRD_DIR@
-RRDTOOL_DIR       = @RRDTOOL_DIR@
-ORCA_SERVICES_DIR = $(VAR_DIR)/orca_services
-PERL_SCRIPTS      = orca_services_running \
-                    orca_services.pl
-SHELL_SCRIPTS     = restart_orca_services \
-                    stop_orca_services \
-                    start_orca_services \
-                    S99orca_services
-TARGETS           = $(PERL_SCRIPTS) $(SHELL_SCRIPTS)
+prefix                = @prefix@
+exec_prefix           = @exec_prefix@
+bindir                = @bindir@
+libdir                = @libdir@
+libexecdir            = @libexecdir@
+sysconfdir            = @sysconfdir@
+INSTALL               = @INSTALL@
+MKDIR                 = @MKDIR@
+PERL_HEAD             = @PERL_HEAD@
+VAR_DIR               = @VAR_DIR@
+RRD_DIR               = @RRD_DIR@
+INIT_D_DIR            = @INIT_D_DIR@
+RCX_D_CONTAINING_DIR  = @RCX_D_CONTAINING_DIR@
+RAW_ORCA_SERVICES_DIR = $(VAR_DIR)/orca_services
+RRD_ORCA_SERVICES_DIR = $(RRD_DIR)/orca_services
+
+BIN_PERL_SCRIPTS      = orca_services_running
+LIBEXEC_PERL_SCRIPTS  = orca_services
+NOINST_PERL_SCRIPTS   =
+PERL_SCRIPTS          = $(BIN_PERL_SCRIPTS) \
+                        $(LIBEXEC_PERL_SCRIPTS) \
+                        $(NOINST_PERL_SCRIPTS)
+
+BIN_SHELL_SCRIPTS     = restart_orca_services \
+                        stop_orca_services \
+                        start_orca_services
+LIBEXEC_SHELL_SCRIPTS = orca_services
+NOINST_SHELL_SCRIPTS  = S99orca_services
+SHELL_SCRIPTS         = $(BIN_SHELL_SCRIPTS) \
+                        $(LIBEXEC_SHELL_SCRIPTS) \
+                        $(NOINST_SHELL_SCRIPTS)
+
+TARGETS               = $(PERL_SCRIPTS) \
+                        $(SHELL_SCRIPTS)
+BIN_TARGETS           = $(BIN_PERL_SCRIPTS) \
+                        $(BIN_SHELL_SCRIPTS)
+LIBEXEC_TARGETS       = $(LIBEXEC_PERL_SCRIPTS) \
+                        $(LIBEXEC_SHELL_SCRIPTS)
 
 all: Makefile $(TARGETS) orca_services.cfg
 
 install: all
 	$(MKDIR) $(bindir)
-	$(MKDIR) $(libdir)
-	$(MKDIR) $(RRD_DIR)/orca_services
-	@for file in $(TARGETS); do \
+	$(MKDIR) $(libexecdir)
+	$(MKDIR) $(sysconfdir)
+	$(MKDIR) $(RAW_ORCA_SERVICES_DIR)
+	$(MKDIR) $(RRD_ORCA_SERVICES_DIR)
+	@for file in $(BIN_TARGETS); do \
 	  echo $(INSTALL) $$file $(bindir); \
 	  $(INSTALL) $$file $(bindir); \
 	done
-	if test -r $(libdir)/orca_services.cfg; then \
-	  cp -p $(libdir)/orca_services.cfg $(libdir)/orca_services.cfg.`date +%Y-%m-%d-%H:%M:%S`; \
+	@for file in $(LIBEXEC_TARGETS); do \
+	  echo $(INSTALL) $$file $(libexecdir); \
+	  $(INSTALL) $$file $(libexecdir); \
+	done
+	if test -r $(sysconfdir)/orca_services.cfg; then \
+	  cp -p $(sysconfdir)/orca_services.cfg $(sysconfdir)/orca_services.cfg.`date +%Y-%m-%d-%H:%M:%S`; \
 	fi
-	$(INSTALL) -m 0644 orca_services.cfg $(libdir)
-	$(INSTALL) -m 0755 orca_services.pl $(libdir)
+	$(INSTALL) -m 0644 orca_services.cfg $(sysconfdir)
 
 orca_services_run_at_boot: all
-	-$(RM) /etc/init.d/orca_services /etc/rc0.d/K01orca_services
-	-$(RM) /etc/rc1.d/K01orca_services /etc/rc3.d/S99orca_services
-	$(INSTALL) -m 0744 S99orca_services /etc/init.d/orca_services
-	ln /etc/init.d/orca_services /etc/rc0.d/K01orca_services
-	ln /etc/init.d/orca_services /etc/rc1.d/K01orca_services
-	ln /etc/init.d/orca_services /etc/rc3.d/S99orca_services
+	test "$(INIT_D_DIR)"
+	test "$(RCX_D_CONTAINING_DIR)"
+	-$(RM) $(INIT_D_DIR)/orca_services
+	-$(RM) $(RCX_D_CONTAINING_DIR)/rc0.d/K01orca_services
+	-$(RM) $(RCX_D_CONTAINING_DIR)/rc1.d/K01orca_services
+	-$(RM) $(RCX_D_CONTAINING_DIR)/rc3.d/S99orca_services
+	$(INSTALL) -m 0744 S99orca_services $(INIT_D_DIR)/orca_services
+	ln $(INIT_D_DIR)/orca_services $(RCX_D_CONTAINING_DIR)/rc0.d/K01orca_services
+	ln $(INIT_D_DIR)/orca_services $(RCX_D_CONTAINING_DIR)/rc1.d/K01orca_services
+	ln $(INIT_D_DIR)/orca_services $(RCX_D_CONTAINING_DIR)/rc3.d/S99orca_services
 
 clean:
 	$(RM) $(TARGETS)
@@ -66,11 +95,8 @@
 orca_services.cfg: orca_services.cfg.in
 	cd ../.. && CONFIG_FILES=data_gatherers/orca_services/orca_services.cfg ./config.status
 
-orca_services.pl: orca_services.pl.in $(PERL_HEAD)
+orca_services.pl: orca_services.pl.in
 	cd ../.. && CONFIG_FILES=data_gatherers/orca_services/orca_services.pl ./config.status
-	cat $(PERL_HEAD) orca_services.pl > orca_services.perl
-	mv orca_services.perl orca_services.pl
-	chmod 0755 orca_services.pl
 
 orca_services_running.pl: orca_services_running.pl.in
 	cd ../.. && CONFIG_FILES=data_gatherers/orca_services/orca_services_running.pl ./config.status

Modified: trunk/orca/data_gatherers/orca_services/start_orca_services.sh.in
==============================================================================
--- trunk/orca/data_gatherers/orca_services/start_orca_services.sh.in	(original)
+++ trunk/orca/data_gatherers/orca_services/start_orca_services.sh.in	2003-01-06 18:02:56.000000000 -0800
@@ -1,29 +1,30 @@
 #!/bin/sh
 
-# This script runs orca_services.pl with the proper options for your
+# This script runs orca_services with the proper options for your
 # site.
 
 # Define program locations that will be needed.
 prefix=@prefix@
 exec_prefix=@exec_prefix@
-libdir=@libdir@
+libexecdir=@libexecdir@
+sysconfdir=@sysconfdir@
 AWK=@AWK@
 CUT=@CUT@
 UNAME=@UNAME@
-ORCA_SERVICES_DIR=@VAR_DIR@/orca_services
+RAW_ORCA_SERVICES_DIR=@VAR_DIR@/orca_services
 
 # Get the hostname without the fully qualified part; that is, trim off
 # anything past the first `.'.
 uname=`$UNAME -n | $CUT -d. -f1`
 
-# The directory these files go into is $ORCA_SERVICES_DIR/HOSTNAME.
-OUTDIR=$ORCA_SERVICES_DIR/$uname
+# The directory these files go into is $RAW_ORCA_SERVICES_DIR/HOSTNAME.
+OUTDIR=$RAW_ORCA_SERVICES_DIR/$uname
 
 # Export the environmental variables.
 export OUTDIR
 
 # Check if orca_services is already running.
-pids=`/usr/ucb/ps auxww | $AWK '/orca_services.pl/ && !/awk/ {print $2}'`
+pids=`/usr/ucb/ps auxww | $AWK '/orca_services/ && !/awk/ {print $2}'`
 if test "$pids" != ""; then
   echo "Orca_services already running.  Exiting."
   exit 1
@@ -48,16 +49,16 @@
 # Now start the logging.
 echo "Starting logging"
 HOSTNAME=`hostname`
-if test -f "$libdir/orca_services.$HOSTNAME"; then
-  $libdir/orca_services.pl `cat $libdir/orca_services.$HOSTNAME`
+if test -f "$libexecdir/orca_services.$HOSTNAME"; then
+  $libexecdir/orca_services `cat $sysconfdir/orca_services.$HOSTNAME`
 else
-  $libdir/orca_services.pl
+  $libexecdir/orca_services
 fi
 
-### # Write the PID of orca_services to a file to make killing easier.
-### pid=$!
-### echo $pid > $OUTDIR/orca_services.pid
+# Write the PID of orca_services to a file to make killing easier.
+pid=$!
+echo $pid > $OUTDIR/orca_services.pid
 
-# Sleep for a couple of seconds to allow any orca_services warnings to
-# appear.
+# Sleep for a couple of seconds to allow any orca_services startup
+# warnings to appear on the terminal before exiting.
 sleep 5

Modified: trunk/orca/data_gatherers/orca_services/stop_orca_services.sh.in
==============================================================================
--- trunk/orca/data_gatherers/orca_services/stop_orca_services.sh.in	(original)
+++ trunk/orca/data_gatherers/orca_services/stop_orca_services.sh.in	2003-01-06 18:02:56.000000000 -0800
@@ -3,16 +3,16 @@
 AWK=@AWK@
 
 # Kill any running orca_services.
-pids=`/usr/ucb/ps auxww | $AWK '/orca_services.pl/ && !/awk/ {print $2}'`
+pids=`/usr/ucb/ps auxww | $AWK '/orca_services/ && !/awk/ {print $2}'`
 if test "$pids" != ""; then
   echo "Killing pids $pids."
   kill -HUP $pids
   sleep 1
-  pids=`/usr/ucb/ps auxww | $AWK '/orca_services.pl/ && !/awk/ {print $2}'`
+  pids=`/usr/ucb/ps auxww | $AWK '/orca_services/ && !/awk/ {print $2}'`
   if test "$pids" != ""; then
     kill -TERM $pids
     sleep 1
-    pids=`/usr/ucb/ps auxww | $AWK '/orca_services.pl/ && !/awk/ {print $2}'`
+    pids=`/usr/ucb/ps auxww | $AWK '/orca_services/ && !/awk/ {print $2}'`
     if test "$pids" != ""; then
       kill -9 $pids
       sleep 1

Modified: trunk/orca/data_gatherers/orca_services/README
==============================================================================
--- trunk/orca/data_gatherers/orca_services/README	(original)
+++ trunk/orca/data_gatherers/orca_services/README	2003-01-06 18:02:56.000000000 -0800
@@ -1,6 +1,6 @@
 ##
 ##
-## Orca_services.pl, a log generating services usage monitor
+## Orca_services: a log generating services usage monitor
 ##
 ##
 
@@ -25,7 +25,7 @@
 	orca_services_running
 		warn if orca_services files are not up to date.
 		Not changed by canau.
-	orca_services.pl
+	orca_services
 		main data collector
 
 SHELL_SCRIPTS
@@ -82,7 +82,7 @@
    Most of the skeleton code of orca_services comes from orcallator. So
    everything is very similar.
 
-4) You might need to edit orca_services.pl to suit your needs. Look for
+4) You might need to edit orca_services to suit your needs. Look for
    code need the ATTENTION string.  You'll probably need to edit
    orca_services.cfg.in.
 



More information about the Orca-checkins mailing list