diff options
-rw-r--r-- | en_US.ISO8859-1/articles/rc-scripting/article.sgml | 38 |
1 files changed, 33 insertions, 5 deletions
diff --git a/en_US.ISO8859-1/articles/rc-scripting/article.sgml b/en_US.ISO8859-1/articles/rc-scripting/article.sgml index 7907178476..ef5974dc34 100644 --- a/en_US.ISO8859-1/articles/rc-scripting/article.sgml +++ b/en_US.ISO8859-1/articles/rc-scripting/article.sgml @@ -662,11 +662,17 @@ run_rc_command "$1"</programlisting> can be specified in <envar>command_args</envar>.</para> <note> - <para>It would be a poor idea to include flags in - <envar>command_args</envar> because most commands cannot - accept flags and ordinary arguments interleaved. A - better way of passing additional flags is to add them - to the beginning of <envar>mumbled_flags</envar>. + <para><emphasis>Never</emphasis> include dashed options, + like <option>-X</option> or <option>--foo</option>, in + <envar>command_args</envar>. + The contents of <envar>command_args</envar> will + appear at the end of the final command line, hence + they are likely to follow arguments present in + <envar>${name}_flags</envar>; but most commands will + not recognize dashed options after ordinary arguments. + A better way of passing additional options + to <envar>$command</envar> is to add them + to the beginning of <envar>${name}_flags</envar>. Another way is to modify <envar>rc_flags</envar> <link linkend="rc-flags">as shown later</link>.</para> </note> @@ -1012,6 +1018,28 @@ run_rc_command "$1"</programlisting> provided. However, nothing prevents us from listing several conditions there, e.g., for compatibility reasons.</para> + + <para>The best style is to use the same name for the + following entities:</para> + + <itemizedlist> + <listitem> + <para>the script's file;</para> + </listitem> + + <listitem> + <para>its main <literal>PROVIDE:</literal> condition;</para> + </listitem> + + <listitem> + <para>its <envar>${name}</envar>;</para> + </listitem> + + <listitem> + <para>the prefix of its &man.rc.conf.5; variables, + as well as of its private variables and functions.</para> + </listitem> + </itemizedlist> </note> </callout> |