OSSP CVS Repository

ossp - Check-in [1637]
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [Patchset]  [Tagging/Branching

Check-in Number: 1637
Date: 2002-Jan-25 17:04:41 (local)
2002-Jan-25 16:04:41 (UTC)
User:ms
Branch:
Comment: Added detail to examples, and studied of abstract syntax in rc.files and rc.conf.

PR: Submitted by: Reviewed by: Approved by: Obtained from:

Tickets:
Inspections:
Files:
ossp-pkg/rc/00TODO      1.8 -> 1.9     8 inserted, 1 deleted
ossp-pkg/rc/rc.conf      1.1 -> 1.2     6 inserted, 6 deleted
ossp-pkg/rc/rc.example      1.1 -> 1.2     58 inserted, 16 deleted

ossp-pkg/rc/00TODO 1.8 -> 1.9

--- 00TODO       2002/01/24 17:47:47     1.8
+++ 00TODO       2002/01/25 16:04:41     1.9
@@ -13,8 +13,15 @@
   If a variable is defined for which no default exists, warn user (Scholli.)
   Avoid a silent failure when giving non-existent run commands (Marcus.)
 
+Possible problems
+  Abstract syntax of rc.file identifiers
+    Need to recognize language syntax, i.e. set, block von XML?
+    Is a regex enough to describe a syntax or do we need more?
+    Cases XML, M4, asn.1, ...
+
 Automated environment
-  Solve problem discussed at OpenPKG eval meeting.
+  Stock rc.func includes AddPath, DelPath, PermMask.
+  Reccommended .bashrc includes rcEnter() and rcExit().
 
 Error handling
   Classic error, give 'restart' command in place of 'start' to stopped prog


ossp-pkg/rc/rc.conf 1.1 -> 1.2

--- rc.conf      2002/01/24 17:47:47     1.1
+++ rc.conf      2002/01/25 16:04:41     1.2
@@ -12,18 +12,18 @@
 #silent
 debug
 #raw
+
 defaultsection  config          #name for config section in rcfile
 commonsection   common          #name for common section in rcfile
-refsymbol       &               #can be @ or any unreserved ASCII symbol
 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
 
-# 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+)=(.*)$'
+regex-sec       '(?<=^|\n)%%%s\s*\n(.+?)(?=\n%\S+|$)'
+regex-ref       '(?<=^|\n)%%%s\s*(.+?)(?=\n|;)'
+regex-assign    '(\s+)=(.*)$'
+regex-param     '..'            #needs explanation
 
 #### Exclusive options ####
 #help


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

--- rc.example   2002/01/24 17:47:47     1.1
+++ rc.example   2002/01/25 16:04:41     1.2
@@ -2,11 +2,39 @@
 ##  rc.example
 ##
 
-#  Generic run commands for example daemon. #
-#  Using custom symbols and identifiers.    #
+#  Generic run commands for example daemon. Using #
+#  default symbols and conventional identifiers.  #
+
+%confvars
+    sftpd_enable="yes"
+    sftpd_interpreter="/usr/bin/sh"
+    sftpd_anonymous="yes"
+    sftpd_flags=""
+
+%start -p 200 -u root
+    /usr/local/sbin/sftpd -c
+
+%stop -p 200 -u root
+    kill -TERM `cat /var/sftp/run/sftpd.pid` 
+
+%reload -u root
+    kill -HUP `cat /var/sftp/run/sftpd.pid` 
+
+%restart -u root
+    @stop       # reference to term section
+    sleep 2
+    @start      # reference to start section
+
+%status -c /usr/bin/perl
+    print STDERR "Sftpd status report";
+    for ...
+
+#  Generic run commands for example daemon. Using   #
+#  custom symbols and unconventional identifiers.   #
 
 !confvars
     sftpd_enable="yes"
+    sftpd_interpreter="/usr/bin/sh"
     sftpd_anonymous="yes"
     sftpd_flags=""
 
@@ -24,25 +52,39 @@
     sleep 2
     &start      # reference to start section
 
+!status -c /usr/bin/perl
+    print STDERR "Sftpd status report";
+    for ...
+
+#  Generic run commands for example daemon. Using #
+#  abstract syntax and conventional identifiers.  #
+
+<config>
+    <set name=sftpd_enable>"yes"</set>
+    <set name=sftpd_interpreter>"/usr/bin/sh"</set>
+    <set name=sftpd_anonymous>"yes"</set>
+    <set name=sftpd_flags>""</set>
+</config>
 
-#  Generic run commands for example daemon. #
-#  Using default symbols and identifiers.   #
-
-%confvars
-    sftpd_enable="yes"
-    sftpd_anonymous="yes"
-    sftpd_flags=""
-
-%start -p 200 -u root
+<start pri=200 user=root>
     /usr/local/sbin/sftpd -c
+</start>
 
-%term -p 200 -u root
+<stop pri=200 user=root>
     kill -TERM `cat /var/sftp/run/sftpd.pid` 
+</stop>
 
-%hangup -u root
+<reload user=root>
     kill -HUP `cat /var/sftp/run/sftpd.pid` 
+</reload>
 
-%restart -u root
-    @term       # reference to term section
+<restart user=root>
+    <refer name=stop>   # reference to term section
     sleep 2
-    @start      # reference to start section
+    <refer name=start>  # reference to start section
+</restart>
+
+<status pri=100 interpreter=/usr/bin/perl>
+    print STDERR "Sftpd status report";
+    for ...
+</status>

CVSTrac 2.0.1