[32043] trunk/doc-new/guide/xml/portfile-startupitem.7.xml

simon at macports.org simon at macports.org
Fri Dec 14 04:10:33 PST 2007


Revision: 32043
          http://trac.macosforge.org/projects/macports/changeset/32043
Author:   simon at macports.org
Date:     2007-12-14 04:10:29 -0800 (Fri, 14 Dec 2007)

Log Message:
-----------
doc-new: Integrated "StartupItems" section from the old portfile.7 man page. Please check this if everything is ok.

Modified Paths:
--------------
    trunk/doc-new/guide/xml/portfile-startupitem.7.xml

Modified: trunk/doc-new/guide/xml/portfile-startupitem.7.xml
===================================================================
--- trunk/doc-new/guide/xml/portfile-startupitem.7.xml	2007-12-14 11:51:05 UTC (rev 32042)
+++ trunk/doc-new/guide/xml/portfile-startupitem.7.xml	2007-12-14 12:10:29 UTC (rev 32043)
@@ -48,18 +48,10 @@
 
           <itemizedlist>
             <listitem>
-              <para>Type: optional</para>
+              <para>Default: <option>no</option></para>
             </listitem>
 
             <listitem>
-              <para>Default: no</para>
-            </listitem>
-
-            <listitem>
-              <para>Values: yes no</para>
-            </listitem>
-
-            <listitem>
               <para>Example:</para>
 
               <programlisting>startupitem.create      yes</programlisting>
@@ -76,21 +68,46 @@
 
           <itemizedlist>
             <listitem>
-              <para>Type: required</para>
+              <para>Default: none</para>
             </listitem>
 
             <listitem>
+              <para>Example:</para>
+
+              <programlisting>startupitem.name        OpenSSH</programlisting>
+            </listitem>
+          </itemizedlist>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term>startupitem.type</term>
+
+        <!-- TODO: check if this is still up to date -->
+
+        <listitem>
+          <para>Select the type of startupitem to generate. By default, a
+          startupitem will be generated that is of the appropriate type for
+          the OS. For instance, launchd is used on system 10.4, while
+          SystemStarter is used on prior Mac OS X systems. A global default
+          may be specified with the startupitem_type preference in ports.conf.
+          </para>
+
+          <itemizedlist>
+            <listitem>
               <para>Default: none</para>
             </listitem>
 
             <listitem>
-              <para>Values: <replaceable>any_name</replaceable></para>
+              <para>Values: <literal>SystemStarter</literal>
+              <literal>launchd</literal> <literal>default</literal>
+              <literal>rcNG</literal></para>
             </listitem>
 
             <listitem>
               <para>Example:</para>
 
-              <programlisting>startupitem.name        OpenSSH</programlisting>
+              <programlisting>startupitem.type        launchd</programlisting>
             </listitem>
           </itemizedlist>
         </listitem>
@@ -107,18 +124,10 @@
 
           <itemizedlist>
             <listitem>
-              <para>Type: optional</para>
-            </listitem>
-
-            <listitem>
               <para>Default: <filename>/dev/null</filename></para>
             </listitem>
 
             <listitem>
-              <para>Values: <replaceable>/file/path</replaceable></para>
-            </listitem>
-
-            <listitem>
               <para>Example:</para>
 
               <programlisting>startupitem.logfile     ${prefix}/var/log/mydaemon.log</programlisting>
@@ -137,18 +146,10 @@
 
           <itemizedlist>
             <listitem>
-              <para>Type: optional</para>
+              <para>Default: <option>no</option></para>
             </listitem>
 
             <listitem>
-              <para>Default: no</para>
-            </listitem>
-
-            <listitem>
-              <para>Values: yes no</para>
-            </listitem>
-
-            <listitem>
               <para>Example:</para>
 
               <programlisting>startupitem.logevents   yes</programlisting>
@@ -166,18 +167,10 @@
 
           <itemizedlist>
             <listitem>
-              <para>Type: optional</para>
+              <para>Default: <option>no</option></para>
             </listitem>
 
             <listitem>
-              <para>Default: no</para>
-            </listitem>
-
-            <listitem>
-              <para>Values: yes no</para>
-            </listitem>
-
-            <listitem>
               <para>Example:</para>
 
               <programlisting>startupitem.netchange   yes</programlisting>
@@ -200,9 +193,9 @@
     <emphasis>indirectly</emphasis> via a script, and therefore it
     automatically knows how to monitor a daemon process and restart it if
     it dies. Daemons used with <quote>executable</quote> StartupItems may
-    be programs or scripts (shell, perl, python, etc.), but when a script
-    the script <emphasis>itself</emphasis> must be the daemon, rather than
-    a script that launches a daemon. <quote>Script</quote> StartupItems
+    be programs or scripts (shell, perl, python, etc.), but when a script is
+    used the script <emphasis>itself</emphasis> must be the daemon, rather
+    than a script that launches a daemon. <quote>Script</quote> StartupItems
     are to be used for the latter.</para>
 
     <note>
@@ -223,19 +216,11 @@
 
           <itemizedlist>
             <listitem>
-              <para>Type: optional</para>
+              <!-- TODO: is the default really no, not none? -->
+              <para>Default: <option>no</option></para>
             </listitem>
 
             <listitem>
-              <para>Default: no</para>
-            </listitem>
-
-            <listitem>
-              <para>Values: <replaceable>/path/to/daemon</replaceable>
-              [<replaceable>args</replaceable>]</para>
-            </listitem>
-
-            <listitem>
               <para>Example:</para>
 
               <programlisting>startupitem.executable  ${prefix}/sbin/vm-pop3d -d 10 -t 600</programlisting>
@@ -261,6 +246,7 @@
         <string>600</string>
         <string>;</string>
 </array>]]></programlisting>
+            <!-- TODO: what is the meaning of this snippet here? -->
           </note>
         </listitem>
       </varlistentry>
@@ -279,13 +265,12 @@
     vm-pop3d daemon.</para>
 
     <programlisting>#!/bin/sh
-#
+
 case "$1" in
-  start)
-       echo -n "Starting vm-pop3d: "
-       /opt/local/sbin/vm-pop3d -d 10 -t 600
+    start)
+        echo -n "Starting vm-pop3d: "
+        /opt/local/sbin/vm-pop3d -d 10 -t 600
 
-
 [... trimmed ...]</programlisting>
 
     <para>But if a script itself is a daemon, use the
@@ -311,25 +296,17 @@
         <term>startupitem.restart</term>
 
         <listitem>
-          <para>Specify a shell script to start, stop, and restart the
-          daemon. In the absence of a restart key, the daemon will be
-          restarted by taking the stop action, followed by the start
+          <para>Specify a shell script to start, stop, and restart the daemon.
+          In the absence of <code>startupitem.restart</code>, the daemon will
+          be restarted by taking the stop action, followed by the start
           action.</para>
 
           <itemizedlist>
             <listitem>
-              <para>Type: optional</para>
-            </listitem>
-
-            <listitem>
               <para>Default: none</para>
             </listitem>
 
             <listitem>
-              <para>Values: <replaceable>shell_script</replaceable></para>
-            </listitem>
-
-            <listitem>
               <para>Examples:</para>
 
               <programlisting>startupitem.start       "${prefix}/share/mysql/mysql.server start"
@@ -355,19 +332,13 @@
           <code>startupitem.restart</code>.</para>
 
           <itemizedlist>
-            <listitem>
-              <para>Type: optional</para>
-            </listitem>
 
             <listitem>
-              <para>Default: no</para>
+              <!-- TODO: is the default really no, not none? -->
+              <para>Default: <option>no</option></para>
             </listitem>
 
             <listitem>
-              <para>Values: <replaceable>shell_script</replaceable></para>
-            </listitem>
-
-            <listitem>
               <para>Example:</para>
 
               <programlisting>startupitem.init        BIN=${prefix}/sbin/bacula-fd</programlisting>
@@ -388,15 +359,17 @@
 
           <itemizedlist>
             <listitem>
-              <para>Type: optional</para>
-            </listitem>
-
-            <listitem>
+              <!-- TODO: this is the default value described in the old
+              portfile.7 man page -->
+              <para>Default: <literal>none
+              ${prefix}/var/run/${name}.pid</literal></para>
+              <!-- TODO: clarify the default value -->
               <para>Default: [none] |
               [<filename>${prefix}/var/run/${name}.pid</filename>]</para>
             </listitem>
 
             <listitem>
+              <!-- TODO: clarify this -->
               <para>Values [none auto manual clean]
               [<replaceable>/path/to/pidfile</replaceable>]</para>
             </listitem>
@@ -443,7 +416,7 @@
               <emphasis>and</emphasis> a port author wants a PID file
               written for some special use. A PID file is not needed to
               detect process death for daemons launched directly by
-              daemondo. As with executale StartupItems, daemondo remembers
+              daemondo. As with executable StartupItems, daemondo remembers
               the PID of the launched process and tracks it
               automatically.</para>
             </listitem>
@@ -498,19 +471,19 @@
     shown below.</para>
 
     <programlisting>#!/bin/sh
-#
+
 # MacPorts generated daemondo support script
 
 # Start
 Start()
 {
-        /opt/local/share/mysql5/mysql/mysql.server start
+    /opt/local/share/mysql5/mysql/mysql.server start
 }
 
 # Stop
 Stop()
 {
-        /opt/local/share/mysql5/mysql/mysql.server stop
+    /opt/local/share/mysql5/mysql/mysql.server stop
 }
 
 [... trimmed ...]</programlisting>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20071214/05263702/attachment-0001.html


More information about the macports-changes mailing list