head 1.7; access; symbols OSSP_RC_0_7_3:1.7 OSSP_RC_0_7_2:1.7 OSSP_RC_0_7_1:1.7 OSSP_RC_ALPHA_06:1.7 OSSP_RC_EXBROKEN:1.7 OSSP_RC_SPEC:1.5; locks; strict; comment @# @; 1.7 date 2002.03.01.22.48.23; author ms; state Exp; branches; next 1.6; 1.6 date 2002.02.04.22.35.20; author ms; state Exp; branches; next 1.5; 1.5 date 2002.01.30.07.55.32; author ms; state Exp; branches; next 1.4; 1.4 date 2002.01.29.15.35.05; author ms; state Exp; branches; next 1.3; 1.3 date 2002.01.28.16.01.23; author ms; state Exp; branches; next 1.2; 1.2 date 2002.01.25.16.04.41; author ms; state Exp; branches; next 1.1; 1.1 date 2002.01.24.17.47.47; author ms; state Exp; branches; next ; desc @@ 1.7 log @Fixed the build, improved the design, improved the configuration and option processing. @ text @# # OSSP rc rc.conf example # #### Return options #### #usage #flag #version #flag #help #flag #info #flag #### Output options #### raw #flag debug #flag #silent #flag verbose #flag #### Exclusive options #### #print #flag eval #flag #exec #flag #### Inquisitive options #### #labels start #query ${foovar:-foodefault} #### Pathname options #### #conf #it's too late to set the conf file in the conf file locate /cw/etc/rc.d:/etc/rc.d:/usr/local/rc func rc.func tmp /var/tmp #Some of these are not in the docs! Get them in there! #!!! FIXME !!! #RSE what about ${begin} regexref '(?<=^|\n)%%%s\s*(.+?)(?=\n|;)' #regexassign '(\s+)=(.*)$' #regexparam '..' #needs explanation #force #flag #file /export/home/rc.init #practically only used on command line #rcfile 'rc.%s' #'rc.' followed by the program name #rcumask 002 #mask checked against rcfile permissions #deactivate OSSP_RC_DEACT #environment variable controls activation #regexsection '(?<=^|\n)%%%s\s*\n(.+?)(?=\n%\S+|$)' #configsection config #name for config section in rcfile #commonsection common #name for common section in rcfile #interpreter /usr/bin/perl #command interpreter to use for script code @ 1.6 log @Fixed copyright. PR: Submitted by: Reviewed by: Approved by: Obtained from: @ text @d5 5 a9 15 #### Inclusive options #### dirs /usr/local/rc /export/home/macgyver/runcommands #file /export/home/rc.init #practically only used on command line tmp /var/tmp verbose #silent debug #raw configsection config #name for config section in rcfile commonsection common #name for common section in rcfile rcfile 'rc.%s' #'rc.' followed by the program name rcumask 002 #mask checked against rcfile permissions deactivate OSSP_RC_DEACT #environment variable controls activation interpreter /usr/bin/perl #command interpreter to use for script code d11 5 a15 3 #RSE what about ${begin} regexref '(?<=^|\n)%%%s\s*(.+?)(?=\n|;)' regexassign '(\s+)=(.*)$' regexparam '..' #needs explanation d17 4 d22 3 d26 5 d33 2 a34 1 regexsection '(?<=^|\n)%%%s\s*\n(.+?)(?=\n%\S+|$)' d36 13 a48 20 usage #flag debug #flag force #flag version #flag #conf #it's too late to set the conf file in the conf file locate /cw/etc/rc.d:/etc/rc.d eval #flag func rc.iofunc \ rc.dbgfunc \ rc.exfunc help #flag info #flag labels start print #flag query ${foovar:-foodefault} silent #flag raw #flag tmp /var/tmp verbose #flag exec #flag @ 1.5 log @dirs renamed to locate @ text @a28 3 a50 1 @ 1.4 log @Pseudocoded anad small adjustments. PR: Submitted by: Reviewed by: Approved by: Obtained from: @ text @a20 1 regexsection '(?<=^|\n)%%%s\s*\n(.+?)(?=\n%\S+|$)' d32 2 d39 1 a39 1 dirs /cw/etc/rc.d:/etc/rc.d @ 1.3 log @start work on aligning longoptions and config file example @ text @d14 1 a14 1 defaultsection config #name for config section in rcfile d21 4 a24 4 regex-sec '(?<=^|\n)%%%s\s*\n(.+?)(?=\n%\S+|$)' regex-ref '(?<=^|\n)%%%s\s*(.+?)(?=\n|;)' regex-assign '(\s+)=(.*)$' regex-param '..' #needs explanation d32 8 a39 1 #conf it's not possible to set the conf file in the conf file d43 7 a49 2 force #flag dirs /cw/etc/rc.d:/etc/rc.d a51 8 silent #flag debug #flag raw #flag help #flag usage #flag version #flag print #flag eval #flag d53 1 a53 3 query ${foovar:-foodefault} labels start info #flag @ 1.2 log @Added detail to examples, and studied of abstract syntax in rc.files and rc.conf. PR: Submitted by: Reviewed by: Approved by: Obtained from: @ text @a5 2 func $OSSP_RC_ROOT/rc.iofunc $OSSP_RC_ROOT/rc.dbgfunc\ $OSSP_RC_ROOT/rc.exfunc d8 1 a8 1 tmpdir /var/tmp d26 26 a51 10 #### Exclusive options #### #help #version #showdefaults #print eval #exec #query #labels #info @ 1.1 log @Buildconf and example files. PR: Submitted by: Reviewed by: Approved by: Obtained from: @ text @d15 1 a17 1 refsymbol & #can be @@ or any unreserved ASCII symbol d21 1 d23 4 a26 5 # The following regex options need explanation regex-section '(?<=^|\n)%%%s\s*\n(.+?)(?=\n%\S+|$)' regex-param '..' regex-reference '(?<=^|\n)%%%s\s*(.+?)(?=\n|;)' regex-config '(\s+)=(.*)$' @