1.1 --- a/openpkg/rc.8 Tue Jul 31 12:12:54 2012 +0200 1.2 +++ b/openpkg/rc.8 Tue Jul 31 12:23:42 2012 +0200 1.3 @@ -1,15 +1,7 @@ 1.4 -.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32 1.5 +.\" Automatically generated by Pod::Man 2.25 (Pod::Simple 3.22) 1.6 .\" 1.7 .\" Standard preamble: 1.8 .\" ======================================================================== 1.9 -.de Sh \" Subsection heading 1.10 -.br 1.11 -.if t .Sp 1.12 -.ne 5 1.13 -.PP 1.14 -\fB\\$1\fR 1.15 -.PP 1.16 -.. 1.17 .de Sp \" Vertical space (when we can't use .PP) 1.18 .if t .sp .5v 1.19 .if n .sp 1.20 @@ -25,11 +17,11 @@ 1.21 .. 1.22 .\" Set up some character translations and predefined strings. \*(-- will 1.23 .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left 1.24 -.\" double quote, and \*(R" will give a right double quote. | will give a 1.25 -.\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to 1.26 -.\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C' 1.27 -.\" expand to `' in nroff, nothing in troff, for use with C<>. 1.28 -.tr \(*W-|\(bv\*(Tr 1.29 +.\" double quote, and \*(R" will give a right double quote. \*(C+ will 1.30 +.\" give a nicer C++. Capital omega is used to do unbreakable dashes and 1.31 +.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, 1.32 +.\" nothing in troff, for use with C<>. 1.33 +.tr \(*W- 1.34 .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' 1.35 .ie n \{\ 1.36 . ds -- \(*W- 1.37 @@ -48,22 +40,25 @@ 1.38 . ds R" '' 1.39 'br\} 1.40 .\" 1.41 +.\" Escape single quotes in literal strings from groff's Unicode transform. 1.42 +.ie \n(.g .ds Aq \(aq 1.43 +.el .ds Aq ' 1.44 +.\" 1.45 .\" If the F register is turned on, we'll generate index entries on stderr for 1.46 -.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index 1.47 +.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index 1.48 .\" entries marked with X<> in POD. Of course, you'll have to process the 1.49 .\" output yourself in some meaningful fashion. 1.50 -.if \nF \{\ 1.51 +.ie \nF \{\ 1.52 . de IX 1.53 . tm Index:\\$1\t\\n%\t"\\$2" 1.54 .. 1.55 . nr % 0 1.56 . rr F 1.57 .\} 1.58 -.\" 1.59 -.\" For nroff, turn off justification. Always turn off hyphenation; it makes 1.60 -.\" way too many mistakes in technical documents. 1.61 -.hy 0 1.62 -.if n .na 1.63 +.el \{\ 1.64 +. de IX 1.65 +.. 1.66 +.\} 1.67 .\" 1.68 .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). 1.69 .\" Fear. Run. Save yourself. No user-serviceable parts. 1.70 @@ -130,24 +125,28 @@ 1.71 .\" 1.72 .IX Title "RC 8" 1.73 .TH RC 8 "OpenPKG" "RC(8)" "OpenPKG" 1.74 +.\" For nroff, turn off justification. Always turn off hyphenation; it makes 1.75 +.\" way too many mistakes in technical documents. 1.76 +.if n .ad l 1.77 +.nh 1.78 .SH "NAME" 1.79 -\&\fB@l_prefix@/bin/openpkg rc\fR \- OpenPKG Run\-Command Processor 1.80 +@l_prefix@/bin/openpkg rc \- OpenPKG Run\-Command Processor 1.81 .SH "SYNOPSIS" 1.82 .IX Header "SYNOPSIS" 1.83 -\&\fB@l_prefix@/bin/openpkg rc\fR [\fB\-s\fR|\fB\-\-silent\fR] [\fB\-v\fR|\fB\-\-verbose\fR] [\fB\-d\fR|\fB\-\-debug\fR] [\fB\-k\fR|\fB\-\-keep\fR] \fIpackage\fR \fIcommand\fR [\fIcommand\fR ...] 1.84 +\&\fB\f(CB@l_prefix\fB@/bin/openpkg rc\fR [\fB\-s\fR|\fB\-\-silent\fR] [\fB\-v\fR|\fB\-\-verbose\fR] [\fB\-d\fR|\fB\-\-debug\fR] [\fB\-k\fR|\fB\-\-keep\fR] [\fB\-D\fR|\fB\-\-define\fR \fIname\fR=\fIvalue\fR] \fIpackage\fR \fIcommand\fR [\fIcommand\fR ...] 1.85 .PP 1.86 -\&\fB@l_prefix@/bin/openpkg rc\fR \fB\-p\fR|\fB\-\-print\fR \fIpackage\fR \fIcommand\fR [\fIcommand\fR ...] 1.87 +\&\fB\f(CB@l_prefix\fB@/bin/openpkg rc\fR \fB\-p\fR|\fB\-\-print\fR \fIpackage\fR \fIcommand\fR [\fIcommand\fR ...] 1.88 .PP 1.89 -eval `\fB@l_prefix@/bin/openpkg rc\fR \fB\-e\fR|\fB\-\-eval\fR \fIpackage\fR \fIcommand\fR [\fIcommand\fR ...]` 1.90 +eval `\fB\f(CB@l_prefix\fB@/bin/openpkg rc\fR \fB\-e\fR|\fB\-\-eval\fR \fIpackage\fR \fIcommand\fR [\fIcommand\fR ...]` 1.91 .PP 1.92 -\&\fB@l_prefix@/bin/openpkg rc\fR \fB\-q\fR|\fB\-\-query\fR \fIvariable\fR [\fIvariable\fR ...] 1.93 +\&\fB\f(CB@l_prefix\fB@/bin/openpkg rc\fR \fB\-q\fR|\fB\-\-query\fR \fIvariable\fR [\fIvariable\fR ...] 1.94 .PP 1.95 -\&\fB@l_prefix@/bin/openpkg rc\fR \fB\-c\fR|\fB\-\-config\fR 1.96 +\&\fB\f(CB@l_prefix\fB@/bin/openpkg rc\fR \fB\-c\fR|\fB\-\-config\fR 1.97 .PP 1.98 -\&\fB@l_prefix@/bin/openpkg rc\fR \fB\-h\fR|\fB\-\-help\fR 1.99 +\&\fB\f(CB@l_prefix\fB@/bin/openpkg rc\fR \fB\-h\fR|\fB\-\-help\fR 1.100 .SH "DESCRIPTION" 1.101 .IX Header "DESCRIPTION" 1.102 -The \fB@l_prefix@/bin/openpkg rc\fR program is the run-command (rc) processor 1.103 +The \fB\f(CB@l_prefix\fB@/bin/openpkg rc\fR program is the run-command (rc) processor 1.104 of the \fBOpenPKG\fR instance \f(CW\*(C`@l_prefix@\*(C'\fR. It allows querying the rc 1.105 configuration variables and the execution of rc command scripts of one 1.106 or more installed \fBOpenPKG\fR packages. The implemented run-command 1.107 @@ -157,9 +156,10 @@ 1.108 procedures with periodical procedures into a single approach. 1.109 .SH "USAGE" 1.110 .IX Header "USAGE" 1.111 -.IP "\fB@l_prefix@/bin/openpkg rc\fR [\fB\-s\fR|\fB\-\-silent\fR] [\fB\-v\fR|\fB\-\-verbose\fR] [\fB\-d\fR|\fB\-\-debug\fR] [\fB\-k\fR|\fB\-\-keep\fR] \fIpackage\fR \fIcommand\fR [\fIcommand\fR ...]" 4 1.112 -.IX Item "@l_prefix@/bin/openpkg rc [-s|--silent] [-v|--verbose] [-d|--debug] [-k|--keep] package command [command ...]" 1.113 -\&\fBRuncommand Execution.\fR This executes one or more specified 1.114 +.ie n .IP "\fB\fB@l_prefix\fB@/bin/openpkg rc\fR [\fB\-s\fR|\fB\-\-silent\fR] [\fB\-v\fR|\fB\-\-verbose\fR] [\fB\-d\fR|\fB\-\-debug\fR] [\fB\-k\fR|\fB\-\-keep\fR] [\fB\-D\fR|\fB\-\-define\fR \fIname\fR=\fIvalue\fR] \fIpackage\fR \fIcommand\fR [\fIcommand\fR ...]" 4 1.115 +.el .IP "\fB\f(CB@l_prefix\fB@/bin/openpkg rc\fR [\fB\-s\fR|\fB\-\-silent\fR] [\fB\-v\fR|\fB\-\-verbose\fR] [\fB\-d\fR|\fB\-\-debug\fR] [\fB\-k\fR|\fB\-\-keep\fR] [\fB\-D\fR|\fB\-\-define\fR \fIname\fR=\fIvalue\fR] \fIpackage\fR \fIcommand\fR [\fIcommand\fR ...]" 4 1.116 +.IX Item "@l_prefix@/bin/openpkg rc [-s|--silent] [-v|--verbose] [-d|--debug] [-k|--keep] [-D|--define name=value] package command [command ...]" 1.117 +\&\fBRun-Command Execution.\fR This executes one or more specified 1.118 \&\fIcommand\fRs in a particular \fIpackage\fR or in all installed packages if 1.119 \&\fIpackage\fR is "\f(CW\*(C`all\*(C'\fR". Option \fB\-\-silent\fR can be used to explicitly 1.120 disable progress messages on \f(CW\*(C`stderr\*(C'\fR. Option \fB\-\-verbose\fR can be used 1.121 @@ -167,19 +167,23 @@ 1.122 automatically determines whether progress messages should be displayed 1.123 or not depending on whether \f(CW\*(C`stderr\*(C'\fR is connected to a terminal device. 1.124 Option \fB\-\-keep\fR can be used for debugging purposes to keep the 1.125 -temporary files were generated during internal processing. 1.126 -.IP "\fB@l_prefix@/bin/openpkg rc\fR \fB\-p\fR|\fB\-\-print\fR \fIpackage\fR \fIcommand\fR [\fIcommand\fR ...]" 4 1.127 +temporary files were generated during internal processing. Option 1.128 +\&\fB\-\-define\fR can be used to on-the-fly re-define a configuration variable 1.129 +\&\fIname\fR with \fIvalue\fR. 1.130 +.ie n .IP "\fB\fB@l_prefix\fB@/bin/openpkg rc\fR \fB\-p\fR|\fB\-\-print\fR \fIpackage\fR \fIcommand\fR [\fIcommand\fR ...]" 4 1.131 +.el .IP "\fB\f(CB@l_prefix\fB@/bin/openpkg rc\fR \fB\-p\fR|\fB\-\-print\fR \fIpackage\fR \fIcommand\fR [\fIcommand\fR ...]" 4 1.132 .IX Item "@l_prefix@/bin/openpkg rc -p|--print package command [command ...]" 1.133 -\&\fBRuncommand Printing.\fR This is like the run-command execution (see 1.134 +\&\fBRun-Command Printing.\fR This is like the run-command execution (see 1.135 above), but instead of immediately executing all involved individual 1.136 run-command scripts, they are concatenated (but with all configuration 1.137 parts reduced to a single configuration part) and printed to \f(CW\*(C`stdout\*(C'\fR. 1.138 Use this for debugging or post-processing purposes. 1.139 -.IP "eval `\fB@l_prefix@/bin/openpkg rc\fR \fB\-e\fR|\fB\-\-eval\fR \fIpackage\fR \fIcommand\fR [\fIcommand\fR ...]`" 4 1.140 +.ie n .IP "eval `\fB\fB@l_prefix\fB@/bin/openpkg rc\fR \fB\-e\fR|\fB\-\-eval\fR \fIpackage\fR \fIcommand\fR [\fIcommand\fR ...]`" 4 1.141 +.el .IP "eval `\fB\f(CB@l_prefix\fB@/bin/openpkg rc\fR \fB\-e\fR|\fB\-\-eval\fR \fIpackage\fR \fIcommand\fR [\fIcommand\fR ...]`" 4 1.142 .IX Item "eval `@l_prefix@/bin/openpkg rc -e|--eval package command [command ...]`" 1.143 -\&\fBRuncommand Evaluation.\fR This is like the run-command execution 1.144 +\&\fBRun-Command Evaluation.\fR This is like the run-command execution 1.145 (see above), but the resulting exported shell environment variables 1.146 -are output to a temporary file as a (Bourne\-Shell or C\-Shell syntax) 1.147 +are output to a temporary file as a (Bourne-Shell or C\-Shell syntax) 1.148 shell script, suitable for evaluation within the shell environment 1.149 of the caller. A one-line script is printed to \f(CW\*(C`stdout\*(C'\fR which then 1.150 \&\*(L"sources\*(R" (and immediately removes) this temporary file. This is 1.151 @@ -187,27 +191,30 @@ 1.152 \&\f(CW\*(C`stdout\*(C'\fR, because not all shell implementations like to "\fBeval\fR\*(L" 1.153 large multi-line scripts. Hence, use this for executing the \*(R"\f(CW\*(C`env\*(C'\fR" 1.154 run-commands within the current shell. 1.155 -.IP "\fB@l_prefix@/bin/openpkg rc\fR \fB\-q\fR|\fB\-\-query\fR \fIvariable\fR [\fIvariable\fR ...]" 4 1.156 +.ie n .IP "\fB\fB@l_prefix\fB@/bin/openpkg rc\fR \fB\-q\fR|\fB\-\-query\fR \fIvariable\fR [\fIvariable\fR ...]" 4 1.157 +.el .IP "\fB\f(CB@l_prefix\fB@/bin/openpkg rc\fR \fB\-q\fR|\fB\-\-query\fR \fIvariable\fR [\fIvariable\fR ...]" 4 1.158 .IX Item "@l_prefix@/bin/openpkg rc -q|--query variable [variable ...]" 1.159 \&\fBConfiguration Variable Querying.\fR This queries the effective values 1.160 (see \fBRUN-COMMAND \s-1CONFIGURATION\s0\fR section below) of one or more 1.161 run-command configuration \fIvariable\fRs. Use this within a shell script 1.162 to selectively query a particular variable. 1.163 -.IP "\fB@l_prefix@/bin/openpkg rc\fR \fB\-c\fR|\fB\-\-config\fR" 4 1.164 +.ie n .IP "\fB\fB@l_prefix\fB@/bin/openpkg rc\fR \fB\-c\fR|\fB\-\-config\fR" 4 1.165 +.el .IP "\fB\f(CB@l_prefix\fB@/bin/openpkg rc\fR \fB\-c\fR|\fB\-\-config\fR" 4 1.166 .IX Item "@l_prefix@/bin/openpkg rc -c|--config" 1.167 \&\fBConfiguration Variable Summary.\fR This displays on \f(CW\*(C`stdout\*(C'\fR a 1.168 three-column table showing the name, default and effective values of 1.169 all run-command configuration variables. If \f(CW\*(C`stdout\*(C'\fR is connected to 1.170 terminal device, variables where the default and effective values differ 1.171 are shown in bold mode. 1.172 -.IP "\fB@l_prefix@/bin/openpkg rc\fR \fB\-h\fR|\fB\-\-help\fR" 4 1.173 +.ie n .IP "\fB\fB@l_prefix\fB@/bin/openpkg rc\fR \fB\-h\fR|\fB\-\-help\fR" 4 1.174 +.el .IP "\fB\f(CB@l_prefix\fB@/bin/openpkg rc\fR \fB\-h\fR|\fB\-\-help\fR" 4 1.175 .IX Item "@l_prefix@/bin/openpkg rc -h|--help" 1.176 \&\fBRequesting Help.\fR This just displays a short summary of 1.177 the usage for this program. 1.178 .SH "FILES" 1.179 .IX Header "FILES" 1.180 -.ie n .Sh "RUN-COMMAND \s-1FILES\s0 (\*(C`@l_prefix@/bin/openpkg rc.d/rc.*\*(C')" 1.181 -.el .Sh "RUN-COMMAND \s-1FILES\s0 (\f(CW\*(C`@l_prefix@/bin/openpkg rc.d/rc.*\*(C'\fP)" 1.182 +.ie n .SS "RUN-COMMAND \s-1FILES\s0 (\*(C`@l_prefix@/bin/openpkg rc.d/rc.*\*(C')" 1.183 +.el .SS "RUN-COMMAND \s-1FILES\s0 (\f(CW\*(C`@l_prefix@/bin/openpkg rc.d/rc.*\*(C'\fP)" 1.184 .IX Subsection "RUN-COMMAND FILES (@l_prefix@/bin/openpkg rc.d/rc.*)" 1.185 The foundation of the \fBOpenPKG\fR run-command facility are the individual 1.186 run-command files \f(CW\*(C`rc.*\*(C'\fR of the installed packages. They are all 1.187 @@ -267,23 +274,23 @@ 1.188 is tagged with option \fB\-o\fR, \fIstdout\fR messages are passed through 1.189 verbatim, even if the section script exists with a zero return value. 1.190 .RS 4 1.191 -.ie n .IP "%start\fR [\fB\-u\fR \fIuser\fR] [\fB\-p\fR \fIpriority]" 4 1.192 +.ie n .IP "%start [\fB\-u\fR \fIuser\fR] [\fB\-p\fR \fIpriority\fR]" 4 1.193 .el .IP "\f(CW%start\fR [\fB\-u\fR \fIuser\fR] [\fB\-p\fR \fIpriority\fR]" 4 1.194 .IX Item "%start [-u user] [-p priority]" 1.195 This section should start daemons or initialize components. 1.196 It is especially executed by \fBOpenPKG\fR during system startup. 1.197 -.ie n .IP "%stop\fR [\fB\-u\fR \fIuser\fR] [\fB\-p\fR \fIpriority]" 4 1.198 +.ie n .IP "%stop [\fB\-u\fR \fIuser\fR] [\fB\-p\fR \fIpriority\fR]" 4 1.199 .el .IP "\f(CW%stop\fR [\fB\-u\fR \fIuser\fR] [\fB\-p\fR \fIpriority\fR]" 4 1.200 .IX Item "%stop [-u user] [-p priority]" 1.201 This section should stop daemons or cleaning up components. It is 1.202 especially executed by \fBOpenPKG\fR during system shutdown and package 1.203 deinstallation. 1.204 -.ie n .IP "%restart\fR [\fB\-u\fR \fIuser\fR] [\fB\-p\fR \fIpriority]" 4 1.205 +.ie n .IP "%restart [\fB\-u\fR \fIuser\fR] [\fB\-p\fR \fIpriority\fR]" 4 1.206 .el .IP "\f(CW%restart\fR [\fB\-u\fR \fIuser\fR] [\fB\-p\fR \fIpriority\fR]" 4 1.207 .IX Item "%restart [-u user] [-p priority]" 1.208 This section should restart daemons. 1.209 It is especially executed by \fBOpenPKG\fR during package upgrades. 1.210 -.ie n .IP "\*(C`%status \-o\*(C'\fR [\fB\-u\fR \fIuser\fR] [\fB\-p\fR \fIpriority]" 4 1.211 +.ie n .IP "\*(C`%status \-o\*(C' [\fB\-u\fR \fIuser\fR] [\fB\-p\fR \fIpriority\fR]" 4 1.212 .el .IP "\f(CW\*(C`%status \-o\*(C'\fR [\fB\-u\fR \fIuser\fR] [\fB\-p\fR \fIpriority\fR]" 4 1.213 .IX Item "%status -o [-u user] [-p priority]" 1.214 This section has to provide status information for a package 1.215 @@ -293,7 +300,7 @@ 1.216 .ie n .IP "\fIpackage\fR\*(C`_enable\*(C'" 4 1.217 .el .IP "\fIpackage\fR\f(CW\*(C`_enable\*(C'\fR" 4 1.218 .IX Item "package_enable" 1.219 -Whether package is enabled, i.e., whether it accepts run\-commands. This 1.220 +Whether package is enabled, i.e., whether it accepts run-commands. This 1.221 variable just has to be printed, because is already set in current 1.222 script environment. 1.223 .ie n .IP "\fIpackage\fR\*(C`_usable\*(C'" 4 1.224 @@ -309,17 +316,17 @@ 1.225 .RE 1.226 .RS 4 1.227 .RE 1.228 -.ie n .IP "%monthly\fR [\fB\-u\fR \fIuser\fR] [\fB\-p\fR \fIpriority]" 4 1.229 +.ie n .IP "%monthly [\fB\-u\fR \fIuser\fR] [\fB\-p\fR \fIpriority\fR]" 4 1.230 .el .IP "\f(CW%monthly\fR [\fB\-u\fR \fIuser\fR] [\fB\-p\fR \fIpriority\fR]" 4 1.231 .IX Item "%monthly [-u user] [-p priority]" 1.232 .PD 0 1.233 -.ie n .IP "%weekly\fR [\fB\-u\fR \fIuser\fR] [\fB\-p\fR \fIpriority]" 4 1.234 +.ie n .IP "%weekly [\fB\-u\fR \fIuser\fR] [\fB\-p\fR \fIpriority\fR]" 4 1.235 .el .IP "\f(CW%weekly\fR [\fB\-u\fR \fIuser\fR] [\fB\-p\fR \fIpriority\fR]" 4 1.236 .IX Item "%weekly [-u user] [-p priority]" 1.237 -.ie n .IP "%hourly\fR [\fB\-u\fR \fIuser\fR] [\fB\-p\fR \fIpriority]" 4 1.238 +.ie n .IP "%hourly [\fB\-u\fR \fIuser\fR] [\fB\-p\fR \fIpriority\fR]" 4 1.239 .el .IP "\f(CW%hourly\fR [\fB\-u\fR \fIuser\fR] [\fB\-p\fR \fIpriority\fR]" 4 1.240 .IX Item "%hourly [-u user] [-p priority]" 1.241 -.ie n .IP "%quarterly\fR [\fB\-u\fR \fIuser\fR] [\fB\-p\fR \fIpriority]" 4 1.242 +.ie n .IP "%quarterly [\fB\-u\fR \fIuser\fR] [\fB\-p\fR \fIpriority\fR]" 4 1.243 .el .IP "\f(CW%quarterly\fR [\fB\-u\fR \fIuser\fR] [\fB\-p\fR \fIpriority\fR]" 4 1.244 .IX Item "%quarterly [-u user] [-p priority]" 1.245 .PD 1.246 @@ -340,16 +347,16 @@ 1.247 package. Some often seen sections are \f(CW%reload\fR (just reload the 1.248 configuration without full stop and start procedure), \f(CW%info\fR (output 1.249 arbitrary information about package), etc. 1.250 -.ie n .Sh "RUN-COMMAND \s-1CONFIGURATION\s0 (\*(C`@l_prefix@/bin/openpkg rc.conf\*(C')" 1.251 -.el .Sh "RUN-COMMAND \s-1CONFIGURATION\s0 (\f(CW\*(C`@l_prefix@/bin/openpkg rc.conf\*(C'\fP)" 1.252 +.ie n .SS "RUN-COMMAND \s-1CONFIGURATION\s0 (\*(C`@l_prefix@/bin/openpkg rc.conf\*(C')" 1.253 +.el .SS "RUN-COMMAND \s-1CONFIGURATION\s0 (\f(CW\*(C`@l_prefix@/bin/openpkg rc.conf\*(C'\fP)" 1.254 .IX Subsection "RUN-COMMAND CONFIGURATION (@l_prefix@/bin/openpkg rc.conf)" 1.255 The run-command configuration variables defined in the "\f(CW%config\fR" 1.256 sections of all installed packages can be overridden by the 1.257 administrator in the global file \f(CW\*(C`@l_prefix@/bin/openpkg rc.conf\*(C'\fR. This file is 1.258 usually empty, but can be filled with Bourne-Shell compatible variable 1.259 assignment statements like "\fIpackage\fR\f(CW\*(C`_\*(C'\fR\fIvariable\fR=\fIvalue\fR". 1.260 -.ie n .Sh "RUN-COMMAND \s-1FUNCTIONS\s0 (\*(C`@l_prefix@/bin/openpkg rc.func\*(C')" 1.261 -.el .Sh "RUN-COMMAND \s-1FUNCTIONS\s0 (\f(CW\*(C`@l_prefix@/bin/openpkg rc.func\*(C'\fP)" 1.262 +.ie n .SS "RUN-COMMAND \s-1FUNCTIONS\s0 (\*(C`@l_prefix@/bin/openpkg rc.func\*(C')" 1.263 +.el .SS "RUN-COMMAND \s-1FUNCTIONS\s0 (\f(CW\*(C`@l_prefix@/bin/openpkg rc.func\*(C'\fP)" 1.264 .IX Subsection "RUN-COMMAND FUNCTIONS (@l_prefix@/bin/openpkg rc.func)" 1.265 The file \f(CW\*(C`@l_prefix@/bin/openpkg rc.func\*(C'\fR is prepended to the scripts of all 1.266 executed run-command sections and provides reusable functions. 1.267 @@ -406,74 +413,60 @@ 1.268 \& foo_log_numfiles="10" 1.269 \& foo_log_minsize="1M" 1.270 \& foo_log_complevel="9" 1.271 -.Ve 1.272 -.PP 1.273 -.Vb 13 1.274 +\& 1.275 \& %common 1.276 \& foo_homedir="@l_prefix@/share/foo" 1.277 \& foo_cfgfile="@l_prefix@/etc/foo/foo.cfg" 1.278 \& foo_pidfile="@l_prefix@/var/foo/foo.pid" 1.279 \& foo_logfile="@l_prefix@/var/foo/foo.log" 1.280 \& foo_signal () { 1.281 -\& if [ -f ${foo_pidfile} ]; then 1.282 -\& kill -$1 `cat ${foo_pidfile}` 1.283 +\& if [ \-f ${foo_pidfile} ]; then 1.284 +\& kill \-$1 \`cat ${foo_pidfile}\` 1.285 \& return $? 1.286 \& else 1.287 \& return 1 1.288 \& fi 1.289 \& } 1.290 -.Ve 1.291 -.PP 1.292 -.Vb 15 1.293 +\& 1.294 \& %status 1.295 \& foo_usable="no" 1.296 -\& if [ ".`grep '<<PASSWORD>>' ${foo_cfgfile}`" = . ]; then 1.297 +\& if [ ".\`grep \*(Aq<<PASSWORD>>\*(Aq ${foo_cfgfile}\`" = . ]; then 1.298 \& foo_usable="yes" 1.299 \& fi 1.300 \& foo_active="no" 1.301 -\& if [ -f ${foo_pidfile} ]; then 1.302 +\& if [ \-f ${foo_pidfile} ]; then 1.303 \& foo_signal 0 1.304 -\& if [ $? -eq 0 ]; then 1.305 +\& if [ $? \-eq 0 ]; then 1.306 \& foo_active="yes" 1.307 \& fi 1.308 \& fi 1.309 \& echo "foo_enable=${foo_enable}" 1.310 \& echo "foo_usable=${foo_usable}" 1.311 \& echo "foo_active=${foo_active}" 1.312 -.Ve 1.313 -.PP 1.314 -.Vb 4 1.315 +\& 1.316 \& %start 1.317 \& rcService foo enable yes || exit 0 1.318 \& rcService foo active yes && exit 0 1.319 -\& @l_prefix@/sbin/foo --listen ${foo_listen} 1.320 -.Ve 1.321 -.PP 1.322 -.Vb 4 1.323 +\& @l_prefix@/sbin/foo \-\-listen ${foo_listen} 1.324 +\& 1.325 \& %stop 1.326 \& rcService foo enable yes || exit 0 1.327 \& rcService foo active yes || exit 0 1.328 \& foo_signal TERM 1.329 -.Ve 1.330 -.PP 1.331 -.Vb 4 1.332 +\& 1.333 \& %restart 1.334 \& rcService foo enable yes || exit 0 1.335 \& rcService foo active yes || exit 0 1.336 \& rc foo stop start 1.337 -.Ve 1.338 -.PP 1.339 -.Vb 7 1.340 +\& 1.341 \& %daily 1.342 \& rcService foo enable yes || exit 0 1.343 -\& shtool rotate -f \e 1.344 -\& -n ${foo_log_numfiles} -s ${foo_log_minsize} -d \e 1.345 -\& -z ${foo_log_complevel} -o @l_rusr@ -g @l_rgrp@ -m 644 \e 1.346 -\& -P "${foo_log_prolog}" -E "${foo_log_epilog}" \e 1.347 +\& shtool rotate \-f \e 1.348 +\& \-n ${foo_log_numfiles} \-s ${foo_log_minsize} \-d \e 1.349 +\& \-z ${foo_log_complevel} \-o @l_rusr@ \-g @l_rgrp@ \-m 644 \e 1.350 +\& \-P "${foo_log_prolog}" \-E "${foo_log_epilog}" \e 1.351 \& ${foo_logfile} 1.352 -.Ve 1.353 -.PP 1.354 -.Vb 5 1.355 +\& 1.356 \& %env 1.357 \& if rcService foo enable yes; then 1.358 \& FOO_HOME="$foo_homedir" 1.359 @@ -485,14 +478,14 @@ 1.360 default values and their effective values of package "\f(CW\*(C`foo\*(C'\fR": 1.361 .PP 1.362 .Vb 1 1.363 -\& $ @l_prefix@/bin/openpkg rc --config | grep "^foo_" 1.364 +\& $ @l_prefix@/bin/openpkg rc \-\-config | grep "^foo_" 1.365 .Ve 1.366 .PP 1.367 Override the default value of a run-command configuration 1.368 variable \f(CW\*(C`foo_listen\*(C'\fR: 1.369 .PP 1.370 .Vb 1 1.371 -\& $ echo 'foo_listen="192.168.0.1"' >>@l_prefix@/bin/openpkg rc.conf 1.372 +\& $ echo \*(Aqfoo_listen="192.168.0.1"\*(Aq >>@l_prefix@/bin/openpkg rc.conf 1.373 .Ve 1.374 .PP 1.375 Stop and start from scratch the package "\f(CW\*(C`foo\*(C'\fR": 1.376 @@ -505,14 +498,14 @@ 1.377 variable \f(CW\*(C`foo_enable\*(C'\fR in a script: 1.378 .PP 1.379 .Vb 1 1.380 -\& if [ ".`@l_prefix@/bin/openpkg rc -q foo_enable`" = .yes ]; then ... 1.381 +\& if [ ".\`@l_prefix@/bin/openpkg rc \-q foo_enable\`" = .yes ]; then ... 1.382 .Ve 1.383 .PP 1.384 Import all environment settings from all (including "\f(CW\*(C`foo\*(C'\fR") installed 1.385 packages into the current Bourne-Shell environment: 1.386 .PP 1.387 .Vb 2 1.388 -\& $ eval `@l_prefix@/bin/openpkg rc --eval all env` 1.389 +\& $ eval \`@l_prefix@/bin/openpkg rc \-\-eval all env\` 1.390 \& $ echo $FOO_HOME 1.391 .Ve 1.392 .SH "SEE ALSO"