Index: ossp-pkg/rc/00TODO RCS File: /v/ossp/cvs/ossp-pkg/rc/00TODO,v rcsdiff -q -kk '-r1.13' '-r1.14' -u '/v/ossp/cvs/ossp-pkg/rc/00TODO,v' 2>/dev/null --- 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 Index: ossp-pkg/rc/rc.pod RCS File: /v/ossp/cvs/ossp-pkg/rc/rc.pod,v rcsdiff -q -kk '-r1.24' '-r1.25' -u '/v/ossp/cvs/ossp-pkg/rc/rc.pod,v' 2>/dev/null --- 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 - OSSP Runcommand Processor -=back 4 - =head1 SYNOPSIS -=over 4 - -@l_prefix@/etc/rc +B [B<-?>|B<--usage>] [B<-D>|B<--debug>] [B<-L>|B<--locate> I[C<:>I[...]]] @@ -65,12 +59,8 @@ I I
-=back 4 - =head1 DESCRIPTION -=over 4 - OSSP rc is a runcommand processor. Its primary function is to scan F script files for B
(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 meaning 'all Fs.' -=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 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 file are read. @@ -216,40 +201,42 @@ =head1 ENVIRONMENT -=over 4 - The environment contains options just as the command line and F 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, 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 - Set to 'yes' or 'true' to totally deactivate B =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, 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 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 - Master configuration file -F - User defined functions library -F - Postprocess variable declaration file -F - Runcommands for 'foo' application - -=back 4 + F - Master configuration file + F - User defined functions library + F - Postprocess variable declaration file + F - 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