OSSP CVS Repository

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

Check-in Number: 3447
Date: 2003-Jun-23 16:43:48 (local)
2003-Jun-23 14:43:48 (UTC)
User:ms
Branch:
Comment: Edit examples and group them according to the three run modes, and improve most basic error message.
Tickets:
Inspections:
Files:
ossp-pkg/rc/rc.pod      1.32 -> 1.33     24 inserted, 18 deleted
ossp-pkg/rc/rc_const.h      1.26 -> 1.27     1 inserted, 1 deleted

ossp-pkg/rc/rc.pod 1.32 -> 1.33

--- rc.pod       2003/06/23 11:29:44     1.32
+++ rc.pod       2003/06/23 14:43:48     1.33
@@ -112,7 +112,7 @@
 =item B<-c>|B<--conf> I<file>[C<:>I<file>[...]]
 
 specify the location of the configuration file. If omitted, C<$OSSP_RC_CONF>
-will be examined. If absent, F<@l_prefix@/etc/rc.conf> will be used. If no
+will be examined. If absent, F</etc/rc.conf> will be used. If no
 F<rc.conf> exists at all, then only command line and environment specified
 options will override the defaults built-in to OSSP rc.
 
@@ -286,16 +286,30 @@
 
 =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 with no arguments.
+The following are one-line examples of commonly used rc commands with no
+arguments. Because no run mode option is specified, B<OSSP rc> will process
+the commands by executing them directly.
 
  /usr/local/bin/rc --info
  /sbin/rc --query lmtp2nntp
+ /usr/local/bin/rc httpd reload
  /cw/etc/rc --conf /etc/rc.conf --debug smtpd stop
- /sfw/etc/rc.d/rc.ntpd --silent start sync stop start
- /usr/local/bin/rc httpd reload # sends a HUP signal
+ /opt/bin/rc ntpd --silent start sync stop start
+
+B<OSSP rc> offers more than just command execution. In the following examples
+because the 'eval' run mode option is specified, B<OSSP rc> will prepare the
+commands by writing a composite script to a tempfile. Then B<OSSP rc> will
+print the file's location in a format most conveniently parsable by eval(1) or
+the bourne shell for evaluation.
+
+ eval `/usr/local/bin/rc --eval all env`
+ /usr/local/bin/rc --eval sendmail start | sh
+
+To read the results of a B<OSSP rc> operation without executing or evaluting
+the runcommands, use the 'print' run mode.
+
+ /opt/binbin/rc --print --info mico
+ /usr/local/bin/rc --print httpd reload
 
 Arguments in the form of name=value pairs may be passed to the section(s)
 given on the command line. In the F<rcfile>, such arguments will appear as
@@ -311,14 +325,6 @@
  /cw/etc/rc.d/rc.ftpd start nMax=32   # a maximum of 32 users can connect
  rc -rdv all stop nSleep=2 start nSleep=4 sLevel="LOG_INFO" bQuiet=1
 
-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
-initializes itself, the runcommands will execute according to the C<eval(1)>
-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`
-
 =head1 FILES
 
  F<rc.conf> - Master configuration file
@@ -345,8 +351,8 @@
 B<OSSP rc> is a drop-in replacement for the prototype run-command facility used
 in OpenPKG (http://www.openpkg.org/). The prototype was a slow and less robust
 Bourne shell script. B<OSSP rc> is comparitively faster, more robust, and more
-flexible. This flexibility allows for wider range of use, and B<OSSP rc> can
-therefore be used in a larger variety of situations. It is no longer exclusive
-to the OpenPKG project.
+feature rich. Its generic design and improved flexibility allows for wider
+range of use, and B<OSSP rc> can therefore be used in a larger variety of
+situations. Today, B<OSSP rc> is not exclusive to the OpenPKG project.
 
 =cut


ossp-pkg/rc/rc_const.h 1.26 -> 1.27

--- rc_const.h   2003/06/23 11:27:54     1.26
+++ rc_const.h   2003/06/23 14:43:48     1.27
@@ -32,7 +32,7 @@
 
 /* Generic text, should include newline termination */
 #define RC_NON_TEXT "No options exist.\n"
-#define RC_LST_TEXT "Please enter just one rcfile and at least one section.\n"
+#define RC_LST_TEXT "Please enter just one rcfile name and at least one section label.\n"
 #define RC_EEP_TEXT "The exec, eval, and print options may not be combined.\n"
 #define RC_SLO_TEXT "The silent option may not be combined with output options.\n"
 #define RC_SUM_TEXT "Option argument summary.\n"

CVSTrac 2.0.1