OSSP CVS Repository

ossp - Difference in ossp-pkg/rc/rc.example versions 1.2 and 1.3
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [History

ossp-pkg/rc/rc.example 1.2 -> 1.3

--- rc.example   2002/01/25 16:04:41     1.2
+++ rc.example   2002/01/30 22:55:26     1.3
@@ -1,9 +1,22 @@
 ##
 ##  rc.example
 ##
+##  Examines different ways of writing run commands for a program.
+##  If used in production, this file would be different. It would
+##  have a name like 'rc.helloworld' and contain run commands for
+##  the 'helloworld' program. It would also have only one notation.
+##  A sample is repeated in this document using rc (native), XML,
+##  and ASN.1 notation. The same rcfile semantics are repeated only
+##  to show what is possible through the abstract syntax offered by
+##  OSSP rc.
+##
+##  To learn what regular expressions must be used with the example
+##  example syntaxes in this document, refer to the rc.conf file
+##  included with the original OSSP rc distribution. It has the
+##  corresponding regular expressions settings.
 
-#  Generic run commands for example daemon. Using #
-#  default symbols and conventional identifiers.  #
+# Generic run commands for example daemon. Using native #
+# rc default symbols and conventional identifiers.      #
 
 %confvars
     sftpd_enable="yes"
@@ -29,8 +42,8 @@
     print STDERR "Sftpd status report";
     for ...
 
-#  Generic run commands for example daemon. Using   #
-#  custom symbols and unconventional identifiers.   #
+# Generic run commands for example daemon. Using #
+# custom symbols and unconventional identifiers. #
 
 !confvars
     sftpd_enable="yes"
@@ -56,8 +69,8 @@
     print STDERR "Sftpd status report";
     for ...
 
-#  Generic run commands for example daemon. Using #
-#  abstract syntax and conventional identifiers.  #
+# Generic run commands for example daemon. Using an #
+# XML-like syntax and conventional identifiers.     #
 
 <config>
     <set name=sftpd_enable>"yes"</set>
@@ -88,3 +101,55 @@
     print STDERR "Sftpd status report";
     for ...
 </status>
+
+# Generic run commands for example daemon. Using a #
+# ASN.1-like syntax and conventional identifiers.  #
+
+config CONFIG
+    BEGIN
+        sftpd_enable STRING ::= "yes"
+        sftpd_interpreter STRING ::= "/usr/bin/sh"
+        sftpd_anonymous STRING ::= "yes"
+        sftpd_flags STRING ::= ""
+    END
+
+start SECTION ::= {
+    priority INTEGER ::= 200
+    user STRING ::= "root"
+}
+    BEGIN
+        /usr/local/sbin/sftpd -c
+    END
+
+stop SECTION ::= {
+    priority INTEGER ::= 200
+    user STRING ::= "root"
+}
+    BEGIN
+        kill -TERM `cat /var/sftp/run/sftpd.pid` 
+    END
+
+reload SECTION ::= {
+    user STRING ::= "root"
+}
+    BEGIN
+        kill -HUP `cat /var/sftp/run/sftpd.pid` 
+    END
+
+restart SECTION ::= {
+    user STRING ::= "root"
+}
+    BEGIN
+        stop REFER      # reference to term section
+        sleep 2
+        start REFER     # reference to start section
+    END
+
+restart SECTION ::= {
+    priority INTEGER ::= 100
+    interpreter STRING ::= "/usr/bin/perl"
+}
+    BEGIN
+        print STDERR "Sftpd status report";
+        for ...
+    END

CVSTrac 2.0.1