OSSP CVS Repository

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

Check-in Number: 1632
Date: 2002-Jan-24 18:47:47 (local)
2002-Jan-24 17:47:47 (UTC)
User:ms
Branch:
Comment: Buildconf and example files.

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

Tickets:
Inspections:
Files:
ossp-pkg/rc/00TODO      1.7 -> 1.8     7 inserted, 3 deleted
ossp-pkg/rc/Makefile.in      added-> 1.1
ossp-pkg/rc/rc.conf      added-> 1.1
ossp-pkg/rc/rc.example      added-> 1.1

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

--- 00TODO       2002/01/24 12:50:55     1.7
+++ 00TODO       2002/01/24 17:47:47     1.8
@@ -2,9 +2,10 @@
 
 Consider
   Make return code and error definitions unique to OSSP rc.
-  Standardize rc.conf
-    Rename rc.conf to rc.post or/and rc.pre
-    New rc.conf has a rc config like syslog.conf, resolv.conf, or inetd.conf
+  Offer include directive in config file.
+  Standardize rc.conf.
+    Rename rc.conf to rc.config.
+    New rc.conf specifies options like syslog.conf or resolv.conf does.
 
 Must do
   Translate rc bourne shell script to ANSI C.
@@ -14,3 +15,6 @@
 
 Automated environment
   Solve problem discussed at OpenPKG eval meeting.
+
+Error handling
+  Classic error, give 'restart' command in place of 'start' to stopped prog


ossp-pkg/rc/Makefile.in -> 1.1

*** /dev/null    Tue Apr 23 18:55:00 2024
--- -    Tue Apr 23 18:55:35 2024
***************
*** 0 ****
--- 1,97 ----
+ ##
+ ##  rc - OSSP Runcommand processor
+ ##  Copyright (c) 2002 Cable & Wireless Deutschland GmbH
+ ##  Copyright (c) 2002 The OSSP Project <http://www.ossp.org/>
+ ##  Copyright (c) 2002 Ralf S. Engelschall
+ ##
+ ##  This file is part of OSSP rc, a portable Runcommand processor
+ ##  which can be found at http://www.ossp.org/pkg/rc/
+ ##
+ ##  Permission to use, copy, modify, and distribute this software for
+ ##  any purpose with or without fee is hereby granted, provided that
+ ##  the above copyright notice and this permission notice appear in all
+ ##  copies.
+ ##
+ ##  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ ##  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ ##  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ ##  IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
+ ##  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ ##  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ ##  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ ##  USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ ##  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ ##  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ ##  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ ##  SUCH DAMAGE.
+ ##
+ ##  Makefile.in: make(1) build procedure
+ ##
+ 
+ @SET_MAKE@
+ 
+ DESTDIR         =
+ prefix          = @prefix@
+ exec_prefix     = @exec_prefix@
+ bindir          = @bindir@
+ sbindir         = @sbindir@
+ libdir          = @libdir@
+ includedir      = @includedir@
+ mandir          = @mandir@
+ 
+ CC              = @CC@
+ CFLAGS          = @CFLAGS@ @DEFS@
+ CPPFLAGS        = @CPPFLAGS@
+ LDFLAGS         = @LDFLAGS@
+ LIBS            = @LIBS@
+ 
+ RM              = rm -f
+ RMDIR           = rmdir
+ SHTOOL          = ./shtool
+ LIBTOOL         = ./libtool
+ POD2MAN         = pod2man
+ TRUE            = true
+ 
+ TARGET          = $(TARGET_PROGS) $(TARGET_MANS) $(TARGET_TESTS)
+ TARGET_PROGS    = rc
+ TARGET_MANS     = rc.1
+ TARGET_TESTS    = rc_test
+ 
+ PROG_OBJS       = rc.o
+ TST_OBJS        = rc_test.o
+ 
+ SUBDIRS         = @SUBDIR_VAR@ @SUBDIR_STR@
+ 
+ all:            $(SUBDIRS) $(TARGET)
+ 
+ .c.o:
+        $(CC) $(CPPFLAGS) $(CFLAGS) -c $<
+ 
+ $(TARGET_TEST): $(TST_OBJS)
+        @$(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o $(TST_NAME) $(TST_OBJS) $(LIB_NAME) $(LIBS)
+ 
+ check: $(TARGET_TEST)
+        @$(LIBTOOL) --mode=execute ./$(TST_NAME)
+ 
+ install:
+        $(SHTOOL) mkdir -f -p -m 755 $(DESTDIR)$(prefix)
+        $(SHTOOL) mkdir -f -p -m 755 $(DESTDIR)$(bindir)
+ 
+ uninstall:
+        -$(RMDIR) $(DESTDIR)$(bindir) >/dev/null 2>&1 || $(TRUE)
+        -$(RMDIR) $(DESTDIR)$(prefix) >/dev/null 2>&1 || $(TRUE)
+ 
+ clean:
+        -$(RM) $(TARGET_PROG) $(PROG_OBJS)
+        -$(RM) $(TARGET_TST) $(TST_OBJS)
+ 
+ distclean: clean
+        -$(RM) config.log config.status config.cache
+        -$(RM) Makefile config.h
+        -$(RM) libtool
+ 
+ realclean: distclean
+        -$(RM) configure config.h.in
+        -$(RM) shtool
+        -$(RM) ltmain.sh libtool.m4 config.guess config.sub
+ 


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

*** /dev/null    Tue Apr 23 18:55:00 2024
--- -    Tue Apr 23 18:55:35 2024
***************
*** 0 ****
--- 1,37 ----
+ # 
+ # OSSP rc rc.conf example
+ # 
+ 
+ #### Inclusive options ####
+ func      $OSSP_RC_ROOT/rc.iofunc $OSSP_RC_ROOT/rc.dbgfunc\
+           $OSSP_RC_ROOT/rc.exfunc
+ dirs      /usr/local/rc /export/home/macgyver/runcommands
+ #file     /export/home/rc.init  #practically only used on command line
+ tmpdir    /var/tmp
+ verbose
+ #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
+ 
+ # 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+)=(.*)$'
+ 
+ #### Exclusive options ####
+ #help
+ #version
+ #showdefaults
+ #print
+ eval
+ #exec
+ #query
+ #labels
+ #info


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

*** /dev/null    Tue Apr 23 18:55:00 2024
--- -    Tue Apr 23 18:55:35 2024
***************
*** 0 ****
--- 1,48 ----
+ ##
+ ##  rc.example
+ ##
+ 
+ #  Generic run commands for example daemon. #
+ #  Using custom symbols and identifiers.    #
+ 
+ !confvars
+     sftpd_enable="yes"
+     sftpd_anonymous="yes"
+     sftpd_flags=""
+ 
+ !start -p 200 -u root
+     /usr/local/sbin/sftpd -c
+ 
+ !term -p 200 -u root
+     kill -TERM `cat /var/sftp/run/sftpd.pid` 
+ 
+ !hangup -u root
+     kill -HUP `cat /var/sftp/run/sftpd.pid` 
+ 
+ !restart -u root
+     &term       # reference to term section
+     sleep 2
+     &start      # reference to start section
+ 
+ 
+ #  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
+     /usr/local/sbin/sftpd -c
+ 
+ %term -p 200 -u root
+     kill -TERM `cat /var/sftp/run/sftpd.pid` 
+ 
+ %hangup -u root
+     kill -HUP `cat /var/sftp/run/sftpd.pid` 
+ 
+ %restart -u root
+     @term       # reference to term section
+     sleep 2
+     @start      # reference to start section

CVSTrac 2.0.1