OSSP CVS Repository

ossp - Check-in [1736]
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [Patchset]  [Tagging/Branching

Check-in Number: 1736
Date: 2002-Jan-31 11:11:43 (local)
2002-Jan-31 10:11:43 (UTC)
User:ms
Branch:
Comment: Add text on section arguments and OSSP_RC_DEACT, improve examples, line up text, remove unneeded =over and =back tags. Prepare for description of control flow and command interpreter logic.

PR: Submitted by: Reviewed by: Approved by: Obtained from:

Tickets:
Inspections:
Files:
ossp-pkg/rc/00TODO      1.13 -> 1.14     2 inserted, 3 deleted
ossp-pkg/rc/rc.pod      1.24 -> 1.25     29 inserted, 53 deleted

ossp-pkg/rc/00TODO 1.13 -> 1.14

--- 00TODO       2002/01/30 22:55:26     1.13
+++ 00TODO       2002/01/31 10:11:43     1.14
@@ -1,13 +1,10 @@
 00TODO: Tasks left to accomplish before rc is complete
 
 Spec fehlt
-  Security
-    Off switch
   Command interpreter (probably goes in rc.usecase.pod)
     Beispiel
     Default
     Error
-  Section arguments (rc sshd restart 2)
   Control flow
     Errors during execution
       Multiple sections given
@@ -18,8 +15,10 @@
       User assumes stop implicitly dropped if program not running
 
 Consider
+  Removing the OSSP_RC_DEACT deactivation feature (thl.)
   Make return code and error definitions unique to OSSP rc.
   Offer include directive in config file.
+  Dynamic handling of command interpreter option.
   Environment of manpage has redundant text.
 
 Must do


ossp-pkg/rc/rc.pod 1.24 -> 1.25

--- rc.pod       2002/01/30 22:55:26     1.24
+++ rc.pod       2002/01/31 10:11:43     1.25
@@ -27,17 +27,11 @@
 
 =head1 NAME
 
-=over 4
-
 B<rc> - OSSP Runcommand Processor
 
-=back 4
-
 =head1 SYNOPSIS
 
-=over 4
-
-@l_prefix@/etc/rc
+B<rc>
 [B<-?>|B<--usage>]
 [B<-D>|B<--debug>] 
 [B<-L>|B<--locate> I<dir>[C<:>I<dir>[...]]]
@@ -65,12 +59,8 @@
 I<rcfile>
 I<section>
 
-=back 4
-
 =head1 DESCRIPTION
 
-=over 4
-
 OSSP rc is a runcommand processor. Its primary function is to scan F<rcfile>
 script files for B<section>(s) and run the commands listed in the section(s).
 
@@ -89,11 +79,8 @@
 exception to this rule is when the reserved keyword 'all' is used as F<rcfile>
 meaning 'all F<rcfile>s.'
 
-=back 4
-
 =head1 OPTIONS
 
-=over 4
 =item B<-?>|B<--usage>
 
 print short usage summary, then exit.
@@ -205,8 +192,6 @@
 
 name of the common section, defaults to %common.
 
-=back 4
-
 Every command line longoption corresponds to a keyword in the F<rc.conf> file.
 When prefixed with 'OSSP_RC_' and its name in upper case, an option can be set
 as an environment variable. First, options from the F<rc.conf> file are read.
@@ -216,40 +201,42 @@
 
 =head1 ENVIRONMENT
 
-=over 4
-
 The environment contains options just as the command line and F<rc.conf> file
 does. An option's corresponding environment variable name must start with
-'OSSP_RC_' and be all upper case.
+'OSSP_RC_' and be all upper case. As a security measure, one environment
+variable exists that is not found as an option elsewhere. This variable
+deactivates B<OSSP rc>, and each subsequent usage will return success and
+print a 'No commands run: OSSP_RC_DEACT set to yes' error message to the
+standard output.
 
-=back 4
+B<OSSP_RC_DEACT> - Set to 'yes' or 'true' to totally deactivate B<OSSP rc>
 
 =head1 RETURN VALUE
 
-=over 4
-
 -1 Error in rc
  0 Success
  1 Error in command executed by rc
 
-=back 4
-
 =head1 EXAMPLES
 
 A runcommand consists of a single program name and one or more sections. The
 wildcard 'all' can be given in place of a program name to denote all programs
 with entries in the rc registry F<$OSSP_RC_ROOT/rc.d>. The following are
-one-line examples of commonly used rc commands.
+one-line examples of commonly used rc commands with no arguments.
 
-  /usr/local/bin/rc --info
-  /sbin/rc --query lmtp2nntp
-  /cw/etc/rc --conf /etc/rc.conf --debug smtpd stop
-  /mybin/rc sshd start LOG_USER  # calls logger(1) and passes LOG_USER
-  /etc/rc lmtp2nntp start 2      # sleep for 2 seconds before returning
-  /sfw/etc/rc --silent ntpd start sync stop start
-  /usr/local/bin/rc httpd reload # sends a HUP signal
-  /etc/rc.d/rc.rsyncd restart 4  # leave a 4 second pause between start and stop
-  /cw/etc/rc.d/rc.ftpd start 32  # a maximum of 32 users can connect
+ /usr/local/bin/rc --info
+ /sbin/rc --query lmtp2nntp
+ /cw/etc/rc --conf /etc/rc.conf --debug smtpd stop
+ /sfw/etc/rc --silent ntpd start sync stop start
+ /usr/local/bin/rc httpd reload # sends a HUP signal
+
+Arguments may also be passed in to B<OSSP rc>, which will forward them to each
+section as it is called.
+
+ /mybin/rc sshd start LOG_USER  # calls logger(1) and passes LOG_USER
+ /etc/rc lmtp2nntp start 2      # sleep for 2 seconds before returning
+ /etc/rc.d/rc.rsyncd restart 4  # leave a 4 second pause between start and stop
+ /cw/etc/rc.d/rc.ftpd start 32  # a maximum of 32 users can connect
 
 To evaluate a runcommand for all programs with an identical section name, a
 short expression can be written into a F<.profile> file. When the shell
@@ -257,39 +244,28 @@
 command. This is often seen when importing the environment of packages of an
 B<OpenPKG> hierarchy, but is always a custom modification made by the user.
 
-  $ eval `@l_prefix@/etc/rc --eval all env`
+ $ eval `@l_prefix@/etc/rc --eval all env`
 
 =head1 FILES
 
-=over 4
-
-F<rc.conf> - Master configuration file
-F<rc.func> - User defined functions library
-F<rc.env>  - Postprocess variable declaration file
-F<rc.foo>  - Runcommands for 'foo' application
-
-=back 4
+ F<rc.conf> - Master configuration file
+ F<rc.func> - User defined functions library
+ F<rc.env>  - Postprocess variable declaration file
+ F<rc.foo>  - Runcommands for 'foo' application
 
 =head1 SEE ALSO
 
-=over 4
-
 OSSP rc integrates concepts taken from other runcommand architectures. For
 more information, inspect the /etc/rc structures provided by the FreeBSD,
 Solaris, and Red Hat distributions.
 
 rc-sample(5), rc.conf(1), and rcfile(1).
 
-=back 4
-
 =head1 AUTHORS
 
-=over 4
-
-Ralf S. Engelschall
-Michael Schloh von Bennewitz
-
-=back 4
+ Ralf S. Engelschall
+ Michael Schloh von Bennewitz
+ Thomas Lotterer
 
 =head1 HISTORY
 

CVSTrac 2.0.1