head 1.29; access; symbols OSSP_RC_0_7_3:1.29 OSSP_RC_0_7_2:1.29 OSSP_RC_0_7_1:1.29 OSSP_RC_ALPHA_06:1.22 OSSP_RC_EXBROKEN:1.22 OSSP_RC_SPEC:1.3; locks; strict; comment @# @; 1.29 date 2003.07.07.13.30.51; author ms; state Exp; branches; next 1.28; 1.28 date 2003.07.07.12.55.42; author ms; state Exp; branches; next 1.27; 1.27 date 2003.06.23.15.46.05; author ms; state Exp; branches; next 1.26; 1.26 date 2003.06.13.10.53.53; author ms; state Exp; branches; next 1.25; 1.25 date 2003.06.12.14.24.15; author ms; state Exp; branches; next 1.24; 1.24 date 2003.06.11.16.18.48; author ms; state Exp; branches; next 1.23; 1.23 date 2003.06.03.15.27.32; author ms; state Exp; branches; next 1.22; 1.22 date 2003.04.03.12.05.14; author ms; state Exp; branches; next 1.21; 1.21 date 2002.08.01.13.25.32; author ms; state Exp; branches; next 1.20; 1.20 date 2002.07.30.16.36.41; author ms; state Exp; branches; next 1.19; 1.19 date 2002.07.29.16.34.21; author ms; state Exp; branches; next 1.18; 1.18 date 2002.07.10.19.04.52; author ms; state Exp; branches; next 1.17; 1.17 date 2002.07.05.12.07.01; author ms; state Exp; branches; next 1.16; 1.16 date 2002.07.05.11.16.20; author ms; state Exp; branches; next 1.15; 1.15 date 2002.07.04.16.51.49; author ms; state Exp; branches; next 1.14; 1.14 date 2002.07.01.15.03.33; author ms; state Exp; branches; next 1.13; 1.13 date 2002.06.28.17.43.23; author ms; state Exp; branches; next 1.12; 1.12 date 2002.06.27.15.35.58; author ms; state Exp; branches; next 1.11; 1.11 date 2002.06.26.14.11.16; author ms; state Exp; branches; next 1.10; 1.10 date 2002.05.22.13.29.40; author ms; state Exp; branches; next 1.9; 1.9 date 2002.04.22.12.49.26; author ms; state Exp; branches; next 1.8; 1.8 date 2002.04.12.19.15.12; author ms; state Exp; branches; next 1.7; 1.7 date 2002.04.11.16.52.45; author ms; state Exp; branches; next 1.6; 1.6 date 2002.03.26.17.11.06; author ms; state Exp; branches; next 1.5; 1.5 date 2002.02.07.15.36.26; author ms; state Exp; branches; next 1.4; 1.4 date 2002.02.04.22.35.20; author ms; state Exp; branches; next 1.3; 1.3 date 2002.01.30.17.29.15; author ms; state Exp; branches; next 1.2; 1.2 date 2002.01.29.08.48.13; author ms; state Exp; branches; next 1.1; 1.1 date 2002.01.08.15.47.11; author ms; state Exp; branches; next ; desc @@ 1.29 log @More header corrections and improvements. @ text @#! /bin/sh # OSSP rc - Run-Command Processor # Copyright (c) 2002-2003 Ralf S. Engelschall # Copyright (c) 2002-2003 Cable & Wireless Deutschland GmbH # Copyright (c) 2002-2003 The OSSP Project # # This file is part of OSSP rc, a portable run-command processor # which can be found at http://www.ossp.org/pkg/lib/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. # # test_rc.sh: Run-Command Processor test script if [ -d $MOPKG/etc ]; then RCBASE=$MOPKG/etc elif [ -d /sw/etc ]; then RCBASE=/sw/etc elif [ -d /cw/etc ]; then RCBASE=/cw/etc elif [ -d /usr/opkg/etc ]; then RCBASE=/usr/opkg/etc fi echo "*** Test short options, should fail for false combination usage ***" echo "./rc -Dvexpf ./rc_test/rcfuncs -islrvc rc.conf -q somevalue -t /tmp -L rc_test samba search" ./rc -Dvexpf ./rc_test/rcfuncs -ilrvc rc.conf -q somevalue -t /tmp -L rc_test samba search echo; echo "" read dummy;clear echo "*** Test short options, should succeed ***" echo "./rc -Dpf ./rc_test/rcfuncs -irt /tmp -L rc_test -c rc.conf samba search finish" ./rc -Dpf ./rc_test/rcfuncs -irt /tmp -L rc_test -c rc.conf samba search finish echo; echo "" read dummy;clear echo "*** Test and evaluate short options, should succeed ***" echo "eval \`./rc -Def ./rc_test/rcfuncs -irt /tmp -L rc_test -c rc.conf samba search finish\`" eval `./rc -Def ./rc_test/rcfuncs -irt /tmp -L rc_test -c rc.conf samba search finish` echo; echo "" read dummy;clear echo "*** Test short options with verbose, should succeed ***" echo "./rc -Dpf ./rc_test/rcfuncs -irvt /tmp -L rc_test -c rc.conf samba search finish" ./rc -Dpf ./rc_test/rcfuncs -irvt /tmp -L rc_test -c rc.conf samba search finish echo; echo "" read dummy;clear #echo "./rc -Derv -L ./rc_test/rc.%{RCFILE:s/^all$/*/} -c ./rc.conf -f ./rc_test/rcfuncs -t /tmp openssh stop sleep=4 start daily minsize=2097152" #./rc -Derv -L ./rc_test/rc.d/rc.%{RCFILE:s/^all$/*/} -c ./rc.conf -f ./rc_test/rcfuncs -t /tmp openssh stop sleep=4 start daily minsize=2097152 #echo; echo "" #read dummy;clear echo "*** Test some long options, should fail for false combination usage ***" echo "./rc --verbose --silent --print --NameConfig config --locate rc_test --ParseSectionDef \"^%(\w+)[ \t]*(.*?)\n(.*?)^$\" zebra sleep=6 start test" ./rc --verbose --silent --print --NameConfig config --locate rc_test --ParseSectionDef "^%(\w+)[ \t]*(.*?)\n(.*?)^$" zebra sleep=6 start test echo; echo "" read dummy;clear echo "*** Test some long options, should fail for false combination usage ***" echo "./rc --query myvar --print --exec --locate rc_test --ParseSectionDef \"^%(\w+)[ \t]*(.*?)\n(.*?)^$\" zebra start test" ./rc --query myvar --print --exec --locate rc_test --ParseSectionDef "^%(\w+)[ \t]*(.*?)\n(.*?)^$" zebra start test echo; echo "" read dummy;clear echo "*** Test some long options, should fail for false combination usage ***" echo "./rc --info --print --eval --silent --ParseSectionDef \"^<(.+?)[ \t]*(.*?)>\n*(.*?)^<\/\1>\" --query format --locate ./rc_test/ pam test" ./rc --info --print --eval --silent --ParseSectionDef "^<(.+?)[ \t]*(.*?)>\n*(.*?)^<\/\1>" --query format --locate ./rc_test/ pam test echo; echo "" read dummy;clear echo "*** Test minimal set of long options, should succeed ***" echo "./rc --locate rc_test --ParseSectionDef \"^<(.+?)[ \t]*(.*?)>\n*(.*?)^<\/\1>\" rsyncd go" ./rc --locate rc_test --ParseSectionDef "^<(.+?)[ \t]*(.*?)>\n*(.*?)^<\/\1>" rsyncd go echo; echo "" read dummy;clear echo "*** Test minimal set of long options, should succeed ***" echo "./rc -L rc_test --ParseSectionDef \"^%([a-zA-Z][a-zA-Z0-9]*)\s*(-[a-zA-Z]\s*\S+)*\n(.+?)\n^%\" zebra test" ./rc -L rc_test --ParseSectionDef "^%([a-zA-Z][a-zA-Z0-9]*)\s*(-[a-zA-Z]\s*\S+)*\n(.+?)\n^%" zebra test echo; echo "" read dummy;clear echo "*** Test minimal set of long options, should succeed ***" echo "./rc --version --ParseSectionDef \"^<(.+?)[ \t]*(.*?)>\n*(.*?)^<\/\1>\" rsyncd nothing matters but the version" ./rc --version --ParseSectionDef "^<(.+?)[ \t]*(.*?)>\n*(.*?)^<\/\1>" rsyncd nothing matters but the version echo; echo "" read dummy;clear echo "*** Test minimal set of long options, should succeed ***" echo "./rc --exec --conf $RCBASE/rc.conf --ParseSectionDef \"^%(\w+)[ \t]*(.*?)\n(.*?)^$\" --locate $RCBASE/rc.d:./rc_test:/etc/rc --query format all barf test" ./rc --exec --conf rc.conf --ParseSectionDef "^%(\w+)[ \t]*(.*?)\n(.*?)^$" --locate rc_test --query format all barf test echo; echo "" read dummy;clear # Some examples using fake rc files and REAL ONES AS WELL, use with care! echo "******************************************************" echo "*The following test will execute test suite code, *" echo "*and code ALSO FROM YOUR REAL OPENPKG RC FILES!!! *" echo "*If this concerns you, then press Ctrl-C now to exit.*" echo "******************************************************" echo; echo "" read dummy;clear echo "./rc --conf $RCBASE/rc.conf --ParseSectionDef \"^%(\w+)[ \t]*(.*?)\n(.*?)^$\" --locate $RCBASE/rc.d:./rc_test:/etc/rc --query all barf test" ./rc --conf $RCBASE/rc.conf --ParseSectionDef "^%(\w+)[ \t]*(.*?)\n(.*?)^$" --locate $RCBASE/rc.d:./rc_test:/etc/rc --query all barf test echo; echo "" #read dummy;clear # FIXME these cases are not handled yet by our configuration FIXME # exit #echo; echo "./rc --debug --version" #./rc --debug --version #echo; echo "./rc --debug --help" #./rc --debug --help #echo; echo "./rc --debug --info --verbose" #./rc --debug --info --verbose #echo; echo "./rc --conf /etc/rc.conf --debug --info --raw" #./rc --conf /etc/rc.conf --debug --info --raw #echo; echo "./rc --conf $RCBASE/rc.conf --tmp /tmp --debug --labels rsyncd" #./rc --conf $RCBASE/rc.conf --tmp /tmp --debug --labels rsyncd # FIXME these cases are not handled yet by our configuration FIXME # #echo; echo "./rc --func rc_test/rcfuncs --ParseSectionDef \"^%(\w+)[ \t]*(.*?)\n(.*?)^$\" --verbose openssh stop sleep=4 start" #./rc --func rc_test/rcfuncs --ParseSectionDef "^%(\w+)[ \t]*(.*?)\n(.*?)^$" --verbose openssh stop sleep=4 start #read dummy;clear #echo; echo "./rc --func ./rc_test/rcfuncs --info --eval uucp restart" #./rc --func ./rc_test/rcfuncs --info --eval uucp restart #read dummy;clear #echo; echo "./rc --conf rc_test/myrc.conf --func ./rc_test/rcfuncs --tmp /tmp --ParseSectionDef \"^<(.+?)[ \t]*(.*?)>\n*(.*?)^<\/\1>\" uucp start" #./rc --conf rc_test/myrc.conf --func ./rc_test/rcfuncs --tmp /tmp --ParseSectionDef "^<(.+?)[ \t]*(.*?)>\n*(.*?)^<\/\1>" uucp start #read dummy;clear #echo; echo "./rc --conf ./rc_test/myrc.conf --func ./rc_test/rcfuncs --tmp /tmp --debug --ParseSectionDef \"^<(.+?)[ \t]*(.*?)>\n*(.*?)^<\/\1>\" ntp sync" #./rc --conf ./rc_test/myrc.conf --func ./rc_test/rcfuncs --tmp /tmp --debug --ParseSectionDef "^<(.+?)[ \t]*(.*?)>\n*(.*?)^<\/\1>" ntp sync #read dummy;clear #echo; echo "./rc --conf ./rc_test/myrc.conf --func ./rc_test/rcfuncs --tmp /tmp --debug --silent --ParseSectionDef \"^<(.+?)[ \t]*(.*?)>\n*(.*?)^<\/\1>\" ralf feed suppe" #./rc --conf ./rc_test/myrc.conf --func ./rc_test/rcfuncs --tmp /tmp --debug --silent --ParseSectionDef "^<(.+?)[ \t]*(.*?)>\n*(.*?)^<\/\1>" ralf feed suppe #read dummy;clear #echo; echo "./rc --conf ./rc_test/myrc.conf --func ./rc_test/rcfuncs -L rc_test --ParseSectionDef \"^%(\w+)[ \t]*(.*?)\n(.*?)^$\" --tmp /tmp --silent samba search finish destroy" #./rc --conf ./rc_test/myrc.conf --func ./rc_test/rcfuncs -L rc_test --ParseSectionDef "^%(\w+)[ \t]*(.*?)\n(.*?)^$" --tmp /tmp --silent samba search finish destroy #read dummy;clear #echo; echo "./rc --conf ./rc_test/myrc.conf --func ./rc_test/rcfuncs -L ./rc_test --ParseSectionDef \"^%(\w+)[ \t]*(.*?)\n(.*?)^$\" --tmp /tmp --silent all feed suppe" #./rc --conf ./rc_test/myrc.conf --func ./rc_test/rcfuncs -L ./rc_test --ParseSectionDef "^%(\w+)[ \t]*(.*?)\n(.*?)^$" --tmp /tmp --silent all feed suppe #read dummy;clear #echo; echo "./rc --conf ./rc_test/myrc.conf --func ./rc_test/rcfuncs -L $RCBASE/rc.d --ParseSectionDef \"^%(\w+)[ \t]*(.*?)\n(.*?)^$\" --tmp /tmp --silent --debug all config barf gag" #./rc --conf ./rc_test/myrc.conf --func ./rc_test/rcfuncs -L $RCBASE/rc.d --ParseSectionDef "^%(\w+)[ \t]*(.*?)\n(.*?)^$" --tmp /tmp --silent --debug all config barf gag #read dummy;clear #echo; echo "./rc --conf ./rc_test/myrc.conf --func ./rc_test/rcfuncs -L $RCBASE/rc.d --ParseSectionDef \"^%(\w+)[ \t]*(.*?)\n(.*?)^$\" --tmp /tmp --silent --debug --eval all config start" #./rc --conf ./rc_test/myrc.conf --func ./rc_test/rcfuncs -L $RCBASE/rc.d --ParseSectionDef "^%(\w+)[ \t]*(.*?)\n(.*?)^$" --tmp /tmp --silent --debug --eval all config start #read dummy;clear #echo; echo "./rc --conf ./rc_test/myrc.conf --func ./rc_test/rcfuncs -L $RCBASE/rc.d --ParseSectionDef \"^%(\w+)[ \t]*(.*?)\n(.*?)^$\" --tmp /tmp --silent --debug --exec all config start" #./rc --conf ./rc_test/myrc.conf --func ./rc_test/rcfuncs -L $RCBASE/rc.d --ParseSectionDef "^%(\w+)[ \t]*(.*?)\n(.*?)^$" --tmp /tmp --silent --debug --exec all config start #echo; echo "./rc --conf ./rc_test/myrc.conf --func ./rc_test/rcfuncs -L $RCBASE/rc.d --ParseSectionDef \"%(.+)\" --tmp /tmp --silent --print --debug pam info" #./rc --conf ./rc_test/myrc.conf --func ./rc_test/rcfuncs -L $RCBASE/rc.d --ParseSectionDef "%(.+)" --tmp /tmp --silent --print --debug pam info #read dummy;clear #echo; echo "./rc --conf ./rc_test/myrc.conf --func ./rc_test/rcfuncs -L $RCBASE/rc.d --ParseSectionDef \"%(.+)\" --tmp /tmp --silent --debug apache config start" #./rc --conf ./rc_test/myrc.conf --func ./rc_test/rcfuncs -L $RCBASE/rc.d --ParseSectionDef "%(.+)" --tmp /tmp --silent --debug apache config start #read dummy;clear #echo; echo "./rc --conf ./rc_test/myrc.conf --func ./rc_test/rcfuncs -L ./rc_test/ --ParseSectionDef \"^<(.+?)[ \t]*(.*?)>\n*(.*?)^<\/\1>\" --tmp /tmp --silent --debug all config start" #./rc --conf ./rc_test/myrc.conf --func ./rc_test/rcfuncs -L ./rc_test/ --ParseSectionDef "^<(.+?)[ \t]*(.*?)>\n*(.*?)^<\/\1>" --tmp /tmp --silent --debug all config start #read dummy;clear #echo; echo "./rc --conf ./rc_test/myrc.conf --func ./rc_test/rcfuncs -L ./rc_test/ --ParseSectionDef \"^<(.+?)[ \t]*(.*?)>\n*(.*?)^<\/\1>\" --tmp /tmp --silent --debug pam info" #./rc --conf ./rc_test/myrc.conf --func ./rc_test/rcfuncs -L ./rc_test/ --ParseSectionDef "^<(.+?)[ \t]*(.*?)>\n*(.*?)^<\/\1>" --tmp /tmp --silent --debug pam info #read dummy;clear #echo; echo "./rc --conf ./rc_test/myrc.conf --func $RCBASE/rc.func -L $RCBASE/rc.d/ --ParseSectionDef \"^%(\w+)[ \t]*(.*?)\n(.*?)^$\" --tmp /tmp --silent --debug dhcpd start" #./rc --conf ./rc_test/myrc.conf --func $RCBASE/rc.func -L $RCBASE/rc.d/ --ParseSectionDef "^%(\w+)[ \t]*(.*?)\n(.*?)^$" --tmp /tmp --silent --debug dhcpd start #read dummy;clear #echo; echo "./rc --func ./rc_test/rcfuncs --exec --ParseSectionDef \"^<(.+?)[ \t]*(.*?)>\n*(.*?)^<\/\1>\" -L ./rc_test pam autre" #./rc --func ./rc_test/rcfuncs --exec --ParseSectionDef "^<(.+?)[ \t]*(.*?)>\n*(.*?)^<\/\1>" -L ./rc_test pam autre #read dummy;clear #echo; echo "./rc --func ./rc_test/rcfuncs -L ./rc_test/ dhcpd stop" #./rc --func ./rc_test/rcfuncs -L ./rc_test/ dhcpd stop #read dummy;clear #echo; echo "./rc --exec --func ./rc_test/rcfuncs -L ./rc_test/ dhcpd gotest" #./rc --exec --func ./rc_test/rcfuncs -L ./rc_test/ dhcpd gotest #read dummy;clear # Next milestone #RequireOwner #RequireGroup #RequireUmask #ParseEnvAss #ParseSectionDef #ParseSectionRef #ParseSectionParam #ParseTerminal #NameConfig #NameCommon #NameDefault #NameError @ 1.28 log @Correct and update copyrights and source headers. @ text @d2 1 a2 1 # OSSP rc - Run-command processor d7 1 a7 1 # This file is part of OSSP rc, a portable Run-command processor d28 1 a28 1 # test_rc.sh: Run-command processor test script @ 1.27 log @Conform to original OpenPKG rc behaviour by processing in execute run mode by default, correct and explain return values, and adjust test suite. @ text @d3 3 a5 3 # Copyright (c) 2002 Ralf S. Engelschall # Copyright (c) 2002 Cable & Wireless Deutschland GmbH # Copyright (c) 2002 The OSSP Project @ 1.26 log @Force scriptNew to always allocate internal data, solving memory handling problems throughout the script class. @ text @d51 5 @ 1.25 log @Add explicit test for verbose mode. @ text @d101 5 a105 3 echo "The following test will execute test suite code," echo "and code ALSO FROM YOUR REAL OPENPKG RC FILES!!!" echo "If this concerns you, then press Ctrl-C now to exit." @ 1.24 log @Implement limited verbosity on eval modus, and begin mergin the label object and the section object. @ text @d47 5 @ 1.23 log @Update test suite to current development state @ text @d77 7 @ 1.22 log @Bring rc back to life, corrected the processor and script object memory problems, and made small changes to test suite. @ text @d32 5 a36 1 else d40 55 a94 25 # Test short options, should fail for false combination usage #echo "./rc -dvef ./rc_test/rcfuncs -hilpsrvxLcqt samba start sleep=2 restart" #./rc -dVef ./rc_test/rcfuncs -hilpsrvxLcqt samba start sleep=2 restart # Test short options, should succeed #echo; echo "./rc -derv -L ./rc_test/rc.%{RCFILE:s/^all$/*/} -c ./rc.conf -f ./rc_test/rcfuncs -t /tmp openssh stop sleep=4 start daily minsize=2097152" #./rc -derv -L ./rc_test/rc.d/rc.%{RCFILE:s/^all$/*/} -c ./rc.conf -f ./rc_test/rcfuncs -t /tmp openssh stop sleep=4 start daily minsize=2097152 # Test some long options, should fail for false combination usage #clear echo; echo "./rc --verbose --silent --print --NameConfig config --ParseSectionDef \"^%(\w+)[ \t]*(.*?)\n(.*?)^$\" uucp stop sleep=6 start" ./rc --verbose --silent --print --NameConfig config --ParseSectionDef "^%(\w+)[ \t]*(.*?)\n(.*?)^$" uucp stop sleep=6 start #read dummy;clear echo; echo "./rc --query myvar --silent --ParseSectionDef \"^%(\w+)[ \t]*(.*?)\n(.*?)^$\" zebra bing bang" ./rc --query myvar --silent --ParseSectionDef "^%(\w+)[ \t]*(.*?)\n(.*?)^$" zebra bing bang #read dummy;clear echo; echo "./rc --conf ./rc.conf --ParseSectionDef \"^<(.+?)[ \t]*(.*?)>\n*(.*?)^<\/\1>\" --locate ./rc_test/ --query this barf test" ./rc --conf ./rc.conf --ParseSectionDef "^<(.+?)[ \t]*(.*?)>\n*(.*?)^<\/\1>" --locate ./rc_test/ --query this barf test #read dummy;clear # Test minimal set of long options, should succeed echo; echo "./rc --debug --version --ParseSectionDef \"^<(.+?)[ \t]*(.*?)>\n*(.*?)^<\/\1>\" rsyncd nothing matters but the version" ./rc --debug --version --ParseSectionDef "^<(.+?)[ \t]*(.*?)>\n*(.*?)^<\/\1>" rsyncd nothing matters but the version #read dummy;clear echo; echo "./rc --conf $RCBASE/rc.conf --ParseSectionDef \"^%(\w+)[ \t]*(.*?)\n(.*?)^$\" --locate $RCBASE/rc.d:./rc_test:/etc/rc --query all barf test" d96 1 d100 1 d113 2 a114 2 echo; echo "./rc --func rc_test/rcfuncs --ParseSectionDef \"^%(\w+)[ \t]*(.*?)\n(.*?)^$\" --verbose openssh stop sleep=4 start" ./rc --func rc_test/rcfuncs --ParseSectionDef "^%(\w+)[ \t]*(.*?)\n(.*?)^$" --verbose openssh stop sleep=4 start d116 2 a117 2 echo; echo "./rc --func ./rc_test/rcfuncs --info --eval uucp restart" ./rc --func ./rc_test/rcfuncs --info --eval uucp restart d119 2 a120 2 echo; echo "./rc --conf rc_test/myrc.conf --func ./rc_test/rcfuncs --tmp /tmp --ParseSectionDef \"^<(.+?)[ \t]*(.*?)>\n*(.*?)^<\/\1>\" uucp start" ./rc --conf rc_test/myrc.conf --func ./rc_test/rcfuncs --tmp /tmp --ParseSectionDef "^<(.+?)[ \t]*(.*?)>\n*(.*?)^<\/\1>" uucp start d122 2 a123 2 echo; echo "./rc --conf ./rc_test/myrc.conf --func ./rc_test/rcfuncs --tmp /tmp --debug --ParseSectionDef \"^<(.+?)[ \t]*(.*?)>\n*(.*?)^<\/\1>\" ntp sync" ./rc --conf ./rc_test/myrc.conf --func ./rc_test/rcfuncs --tmp /tmp --debug --ParseSectionDef "^<(.+?)[ \t]*(.*?)>\n*(.*?)^<\/\1>" ntp sync d125 2 a126 2 echo; echo "./rc --conf ./rc_test/myrc.conf --func ./rc_test/rcfuncs --tmp /tmp --debug --silent --ParseSectionDef \"^<(.+?)[ \t]*(.*?)>\n*(.*?)^<\/\1>\" ralf feed suppe" ./rc --conf ./rc_test/myrc.conf --func ./rc_test/rcfuncs --tmp /tmp --debug --silent --ParseSectionDef "^<(.+?)[ \t]*(.*?)>\n*(.*?)^<\/\1>" ralf feed suppe d128 2 a129 2 echo; echo "./rc --conf ./rc_test/myrc.conf --func ./rc_test/rcfuncs -L rc_test --ParseSectionDef \"^%(\w+)[ \t]*(.*?)\n(.*?)^$\" --tmp /tmp --silent samba search finish destroy" ./rc --conf ./rc_test/myrc.conf --func ./rc_test/rcfuncs -L rc_test --ParseSectionDef "^%(\w+)[ \t]*(.*?)\n(.*?)^$" --tmp /tmp --silent samba search finish destroy d132 2 a133 2 echo; echo "./rc --conf ./rc_test/myrc.conf --func ./rc_test/rcfuncs -L ./rc_test --ParseSectionDef \"^%(\w+)[ \t]*(.*?)\n(.*?)^$\" --tmp /tmp --silent all feed suppe" ./rc --conf ./rc_test/myrc.conf --func ./rc_test/rcfuncs -L ./rc_test --ParseSectionDef "^%(\w+)[ \t]*(.*?)\n(.*?)^$" --tmp /tmp --silent all feed suppe d136 2 a137 2 echo; echo "./rc --conf ./rc_test/myrc.conf --func ./rc_test/rcfuncs -L $RCBASE/rc.d --ParseSectionDef \"^%(\w+)[ \t]*(.*?)\n(.*?)^$\" --tmp /tmp --silent --debug all config barf gag" ./rc --conf ./rc_test/myrc.conf --func ./rc_test/rcfuncs -L $RCBASE/rc.d --ParseSectionDef "^%(\w+)[ \t]*(.*?)\n(.*?)^$" --tmp /tmp --silent --debug all config barf gag d140 2 a141 2 echo; echo "./rc --conf ./rc_test/myrc.conf --func ./rc_test/rcfuncs -L $RCBASE/rc.d --ParseSectionDef \"^%(\w+)[ \t]*(.*?)\n(.*?)^$\" --tmp /tmp --silent --debug --eval all config start" ./rc --conf ./rc_test/myrc.conf --func ./rc_test/rcfuncs -L $RCBASE/rc.d --ParseSectionDef "^%(\w+)[ \t]*(.*?)\n(.*?)^$" --tmp /tmp --silent --debug --eval all config start d147 2 a148 2 echo; echo "./rc --conf ./rc_test/myrc.conf --func ./rc_test/rcfuncs -L $RCBASE/rc.d --ParseSectionDef \"%(.+)\" --tmp /tmp --silent --print --debug pam info" ./rc --conf ./rc_test/myrc.conf --func ./rc_test/rcfuncs -L $RCBASE/rc.d --ParseSectionDef "%(.+)" --tmp /tmp --silent --print --debug pam info d151 2 a152 2 echo; echo "./rc --conf ./rc_test/myrc.conf --func ./rc_test/rcfuncs -L $RCBASE/rc.d --ParseSectionDef \"%(.+)\" --tmp /tmp --silent --debug apache config start" ./rc --conf ./rc_test/myrc.conf --func ./rc_test/rcfuncs -L $RCBASE/rc.d --ParseSectionDef "%(.+)" --tmp /tmp --silent --debug apache config start d155 2 a156 2 echo; echo "./rc --conf ./rc_test/myrc.conf --func ./rc_test/rcfuncs -L ./rc_test/ --ParseSectionDef \"^<(.+?)[ \t]*(.*?)>\n*(.*?)^<\/\1>\" --tmp /tmp --silent --debug all config start" ./rc --conf ./rc_test/myrc.conf --func ./rc_test/rcfuncs -L ./rc_test/ --ParseSectionDef "^<(.+?)[ \t]*(.*?)>\n*(.*?)^<\/\1>" --tmp /tmp --silent --debug all config start d159 2 a160 2 echo; echo "./rc --conf ./rc_test/myrc.conf --func ./rc_test/rcfuncs -L ./rc_test/ --ParseSectionDef \"^<(.+?)[ \t]*(.*?)>\n*(.*?)^<\/\1>\" --tmp /tmp --silent --debug pam info" ./rc --conf ./rc_test/myrc.conf --func ./rc_test/rcfuncs -L ./rc_test/ --ParseSectionDef "^<(.+?)[ \t]*(.*?)>\n*(.*?)^<\/\1>" --tmp /tmp --silent --debug pam info d163 2 a164 2 echo; echo "./rc --conf ./rc_test/myrc.conf --func $RCBASE/rc.func -L $RCBASE/rc.d/ --ParseSectionDef \"^%(\w+)[ \t]*(.*?)\n(.*?)^$\" --tmp /tmp --silent --debug dhcpd start" ./rc --conf ./rc_test/myrc.conf --func $RCBASE/rc.func -L $RCBASE/rc.d/ --ParseSectionDef "^%(\w+)[ \t]*(.*?)\n(.*?)^$" --tmp /tmp --silent --debug dhcpd start d167 2 a168 2 echo; echo "./rc --func ./rc_test/rcfuncs --exec --ParseSectionDef \"^<(.+?)[ \t]*(.*?)>\n*(.*?)^<\/\1>\" -L ./rc_test pam autre" ./rc --func ./rc_test/rcfuncs --exec --ParseSectionDef "^<(.+?)[ \t]*(.*?)>\n*(.*?)^<\/\1>" -L ./rc_test pam autre d171 2 a172 2 echo; echo "./rc --func ./rc_test/rcfuncs -L ./rc_test/ dhcpd stop" ./rc --func ./rc_test/rcfuncs -L ./rc_test/ dhcpd stop d175 2 a176 2 echo; echo "./rc --exec --func ./rc_test/rcfuncs -L ./rc_test/ dhcpd gotest" ./rc --exec --func ./rc_test/rcfuncs -L ./rc_test/ dhcpd gotest @ 1.21 log @Added generic parsing of section arguments, adjusted defaults and tests. @ text @d45 1 d48 1 d51 1 d54 1 d59 1 d62 1 d79 1 d82 1 d85 1 d88 1 d91 1 d94 1 d98 1 d102 1 d106 1 d113 1 d117 1 d121 1 d125 1 d129 1 d133 1 d137 1 d141 1 @ 1.20 log @Implemented command execution mode, and now OSSP rc is dangerous to use because it will actually execute code. Test suite is adjusted accordingly. @ text @d45 6 a50 6 echo; echo "./rc --verbose --silent --print --NameConfig config --ParseSectionDef \"^%(\w+).*?\n(.*?)^$\" uucp stop sleep=6 start" ./rc --verbose --silent --print --NameConfig config --ParseSectionDef "^%(\w+).*?\n(.*?)^$" uucp stop sleep=6 start echo; echo "./rc --query myvar --silent --ParseSectionDef \"^%(\w+).*?\n(.*?)^$\" zebra bing bang" ./rc --query myvar --silent --ParseSectionDef "^%(\w+).*?\n(.*?)^$" zebra bing bang echo; echo "./rc --conf ./rc.conf --ParseSectionDef \"^<(.+?)\s*.*?>\n*(.*?)^<\/\1>\" --locate ./rc_test/ --query this barf test" ./rc --conf ./rc.conf --ParseSectionDef "^<(.+?)\s*.*?>\n*(.*?)^<\/\1>" --locate ./rc_test/ --query this barf test d53 4 a56 4 echo; echo "./rc --debug --version --ParseSectionDef \"^<(.+?)\s*.*?>\n*(.*?)^<\/\1>\" rsyncd nothing matters but the version" ./rc --debug --version --ParseSectionDef "^<(.+?)\s*.*?>\n*(.*?)^<\/\1>" rsyncd nothing matters but the version echo; echo "./rc --conf $RCBASE/rc.conf --ParseSectionDef \"^%(\w+).*?\n(.*?)^$\" --locate $RCBASE/rc.d:./rc_test:/etc/rc --query all barf test" ./rc --conf $RCBASE/rc.conf --ParseSectionDef "^%(\w+).*?\n(.*?)^$" --locate $RCBASE/rc.d:./rc_test:/etc/rc --query all barf test d71 2 a72 2 echo; echo "./rc --func rc_test/rcfuncs --ParseSectionDef \"^%(\w+).*?\n(.*?)^$\" --verbose openssh stop sleep=4 start" ./rc --func rc_test/rcfuncs --ParseSectionDef "^%(\w+).*?\n(.*?)^$" --verbose openssh stop sleep=4 start d75 11 a85 11 echo; echo "./rc --conf rc_test/myrc.conf --func ./rc_test/rcfuncs --tmp /tmp --ParseSectionDef \"^<(.+?)\s*.*?>\n*(.*?)^<\/\1>\" uucp start" ./rc --conf rc_test/myrc.conf --func ./rc_test/rcfuncs --tmp /tmp --ParseSectionDef "^<(.+?)\s*.*?>\n*(.*?)^<\/\1>" uucp start echo; echo "./rc --conf ./rc_test/myrc.conf --func ./rc_test/rcfuncs --tmp /tmp --debug --ParseSectionDef \"^<(.+?)\s*.*?>\n*(.*?)^<\/\1>\" ntp sync" ./rc --conf ./rc_test/myrc.conf --func ./rc_test/rcfuncs --tmp /tmp --debug --ParseSectionDef "^<(.+?)\s*.*?>\n*(.*?)^<\/\1>" ntp sync echo; echo "./rc --conf ./rc_test/myrc.conf --func ./rc_test/rcfuncs --tmp /tmp --debug --silent --ParseSectionDef \"^<(.+?)\s*.*?>\n*(.*?)^<\/\1>\" ralf feed suppe" ./rc --conf ./rc_test/myrc.conf --func ./rc_test/rcfuncs --tmp /tmp --debug --silent --ParseSectionDef "^<(.+?)\s*.*?>\n*(.*?)^<\/\1>" ralf feed suppe echo; echo "./rc --conf ./rc_test/myrc.conf --func ./rc_test/rcfuncs -L rc_test --ParseSectionDef \"^%(\w+).*?\n(.*?)^$\" --tmp /tmp --silent samba search finish destroy" ./rc --conf ./rc_test/myrc.conf --func ./rc_test/rcfuncs -L rc_test --ParseSectionDef "^%(\w+).*?\n(.*?)^$" --tmp /tmp --silent samba search finish destroy echo; echo "./rc --conf ./rc_test/myrc.conf --func ./rc_test/rcfuncs -L ./rc_test --ParseSectionDef \"^%(\w+).*?\n(.*?)^$\" --tmp /tmp --silent all feed suppe" ./rc --conf ./rc_test/myrc.conf --func ./rc_test/rcfuncs -L ./rc_test --ParseSectionDef "^%(\w+).*?\n(.*?)^$" --tmp /tmp --silent all feed suppe d87 2 a88 2 echo; echo "./rc --conf ./rc_test/myrc.conf --func ./rc_test/rcfuncs -L $RCBASE/rc.d --ParseSectionDef \"^%(\w+).*?\n(.*?)^$\" --tmp /tmp --silent --debug all config barf gag" ./rc --conf ./rc_test/myrc.conf --func ./rc_test/rcfuncs -L $RCBASE/rc.d --ParseSectionDef "^%(\w+).*?\n(.*?)^$" --tmp /tmp --silent --debug all config barf gag d90 2 a91 2 echo; echo "./rc --conf ./rc_test/myrc.conf --func ./rc_test/rcfuncs -L $RCBASE/rc.d --ParseSectionDef \"^%(\w+).*?\n(.*?)^$\" --tmp /tmp --silent --debug --eval all config start" ./rc --conf ./rc_test/myrc.conf --func ./rc_test/rcfuncs -L $RCBASE/rc.d --ParseSectionDef "^%(\w+).*?\n(.*?)^$" --tmp /tmp --silent --debug --eval all config start d93 2 a94 2 #echo; echo "./rc --conf ./rc_test/myrc.conf --func ./rc_test/rcfuncs -L $RCBASE/rc.d --ParseSectionDef \"^%(\w+).*?\n(.*?)^$\" --tmp /tmp --silent --debug --exec all config start" #./rc --conf ./rc_test/myrc.conf --func ./rc_test/rcfuncs -L $RCBASE/rc.d --ParseSectionDef "^%(\w+).*?\n(.*?)^$" --tmp /tmp --silent --debug --exec all config start d102 2 a103 2 echo; echo "./rc --conf ./rc_test/myrc.conf --func ./rc_test/rcfuncs -L ./rc_test/ --ParseSectionDef \"^<(.+?)\s*.*?>\n*(.*?)^<\/\1>\" --tmp /tmp --silent --debug all config start" ./rc --conf ./rc_test/myrc.conf --func ./rc_test/rcfuncs -L ./rc_test/ --ParseSectionDef "^<(.+?)\s*.*?>\n*(.*?)^<\/\1>" --tmp /tmp --silent --debug all config start d105 2 a106 2 echo; echo "./rc --conf ./rc_test/myrc.conf --func ./rc_test/rcfuncs -L ./rc_test/ --ParseSectionDef \"^<(.+?)\s*.*?>\n*(.*?)^<\/\1>\" --tmp /tmp --silent --debug pam info" ./rc --conf ./rc_test/myrc.conf --func ./rc_test/rcfuncs -L ./rc_test/ --ParseSectionDef "^<(.+?)\s*.*?>\n*(.*?)^<\/\1>" --tmp /tmp --silent --debug pam info d108 2 a109 2 echo; echo "./rc --conf ./rc_test/myrc.conf --func $RCBASE/rc.func -L $RCBASE/rc.d/ --ParseSectionDef \"^%(\w+).*?\n(.*?)^$\" --tmp /tmp --silent --debug dhcpd start" ./rc --conf ./rc_test/myrc.conf --func $RCBASE/rc.func -L $RCBASE/rc.d/ --ParseSectionDef "^%(\w+).*?\n(.*?)^$" --tmp /tmp --silent --debug dhcpd start d111 2 a112 2 echo; echo "./rc --func ./rc_test/rcfuncs -L ./rc_test/ --ParseSectionDef \"^<(.+?)\s*.*?>\n*(.*?)^<\/\1>\" pam info" ./rc --func ./rc_test/rcfuncs -L ./rc_test/ --ParseSectionDef "^<(.+?)\s*.*?>\n*(.*?)^<\/\1>" pam info @ 1.19 log @Expand test script to include recently added default option functionality. @ text @d93 2 a94 2 echo; echo "./rc --conf ./rc_test/myrc.conf --func ./rc_test/rcfuncs -L $RCBASE/rc.d --ParseSectionDef \"^%(\w+).*?\n(.*?)^$\" --tmp /tmp --silent --debug --exec all config start" ./rc --conf ./rc_test/myrc.conf --func ./rc_test/rcfuncs -L $RCBASE/rc.d --ParseSectionDef "^%(\w+).*?\n(.*?)^$" --tmp /tmp --silent --debug --exec all config start d114 5 a118 2 echo; echo "./rc --func ./rc_test/rcfuncs -L ./rc_test/ ntp stop" ./rc --func ./rc_test/rcfuncs -L ./rc_test/ ntp stop @ 1.18 log @Update test suite to reflect changes in config, func, rcfile, and section logic. Not having default values in the configuration remains problem number one for testing. @ text @d45 6 a50 6 echo; echo "./rc --verbose --silent --NameConfig config --ParseSectionDef \"^%(\w+).*?\n(.*?)^$\" uucp stop sleep=6 start" ./rc --verbose --silent --NameConfig config --ParseSectionDef "^%(\w+).*?\n(.*?)^$" uucp stop sleep=6 start echo; echo "./rc --query myvar --silent --NameConfig config --ParseSectionDef \"^%(\w+).*?\n(.*?)^$\" zebra bing bang" ./rc --query myvar --silent --NameConfig config --ParseSectionDef "^%(\w+).*?\n(.*?)^$" zebra bing bang echo; echo "./rc --conf ./rc.conf --NameConfig config --ParseSectionDef \"^<(.+?)\s*.*?>\n*(.*?)^<\/\1>\" --locate ./rc_test/ --query this barf test" ./rc --conf ./rc.conf --NameConfig config --ParseSectionDef "^<(.+?)\s*.*?>\n*(.*?)^<\/\1>" --locate ./rc_test/ --query this barf test d53 4 a56 4 echo; echo "./rc --debug --version --NameConfig config --ParseSectionDef \"^<(.+?)\s*.*?>\n*(.*?)^<\/\1>\" rsyncd nothing matters but the version" ./rc --debug --version --NameConfig config --ParseSectionDef "^<(.+?)\s*.*?>\n*(.*?)^<\/\1>" rsyncd nothing matters but the version echo; echo "./rc --conf $RCBASE/rc.conf --NameConfig config --ParseSectionDef \"^%(\w+).*?\n(.*?)^$\" --locate $RCBASE/rc.d:./rc_test:/etc/rc --query all barf test" ./rc --conf $RCBASE/rc.conf --NameConfig config --ParseSectionDef "^%(\w+).*?\n(.*?)^$" --locate $RCBASE/rc.d:./rc_test:/etc/rc --query all barf test d71 2 a72 2 echo; echo "./rc --func rc_test/rcfuncs --print --NameConfig config --ParseSectionDef \"^%(\w+).*?\n(.*?)^$\" --verbose openssh stop sleep=4 start" ./rc --func rc_test/rcfuncs --print --NameConfig config --ParseSectionDef "^%(\w+).*?\n(.*?)^$" --verbose openssh stop sleep=4 start d75 8 a82 8 echo; echo "./rc --conf rc_test/myrc.conf --func ./rc_test/rcfuncs --tmp /tmp --NameConfig config --ParseSectionDef \"^<(.+?)\s*.*?>\n*(.*?)^<\/\1>\" --print uucp start" ./rc --conf rc_test/myrc.conf --func ./rc_test/rcfuncs --tmp /tmp --NameConfig config --ParseSectionDef "^<(.+?)\s*.*?>\n*(.*?)^<\/\1>" --print uucp start echo; echo "./rc --conf ./rc_test/myrc.conf --func ./rc_test/rcfuncs --tmp /tmp --debug --NameConfig config --ParseSectionDef \"^<(.+?)\s*.*?>\n*(.*?)^<\/\1>\" --print ntp sync" ./rc --conf ./rc_test/myrc.conf --func ./rc_test/rcfuncs --tmp /tmp --debug --NameConfig config --ParseSectionDef "^<(.+?)\s*.*?>\n*(.*?)^<\/\1>" --print ntp sync echo; echo "./rc --conf ./rc_test/myrc.conf --func ./rc_test/rcfuncs --tmp /tmp --debug --silent --NameConfig config --ParseSectionDef \"^<(.+?)\s*.*?>\n*(.*?)^<\/\1>\" --print ralf feed suppe" ./rc --conf ./rc_test/myrc.conf --func ./rc_test/rcfuncs --tmp /tmp --debug --silent --NameConfig config --ParseSectionDef "^<(.+?)\s*.*?>\n*(.*?)^<\/\1>" --print ralf feed suppe echo; echo "./rc --conf ./rc_test/myrc.conf --func ./rc_test/rcfuncs -L rc_test --NameConfig config --ParseSectionDef \"^%(\w+).*?\n(.*?)^$\" --tmp /tmp --silent --print samba search finish destroy" ./rc --conf ./rc_test/myrc.conf --func ./rc_test/rcfuncs -L rc_test --NameConfig config --ParseSectionDef "^%(\w+).*?\n(.*?)^$" --tmp /tmp --silent --print samba search finish destroy d84 2 a85 2 echo; echo "./rc --conf ./rc_test/myrc.conf --func ./rc_test/rcfuncs -L ./rc_test --NameConfig config --ParseSectionDef \"^%(\w+).*?\n(.*?)^$\" --tmp /tmp --silent --print all feed suppe" ./rc --conf ./rc_test/myrc.conf --func ./rc_test/rcfuncs -L ./rc_test --NameConfig config --ParseSectionDef "^%(\w+).*?\n(.*?)^$" --tmp /tmp --silent --print all feed suppe d87 2 a88 2 echo; echo "./rc --conf ./rc_test/myrc.conf --func ./rc_test/rcfuncs -L $RCBASE/rc.d --NameConfig config --ParseSectionDef \"^%(\w+).*?\n(.*?)^$\" --tmp /tmp --silent --debug --print all config barf gag" ./rc --conf ./rc_test/myrc.conf --func ./rc_test/rcfuncs -L $RCBASE/rc.d --NameConfig config --ParseSectionDef "^%(\w+).*?\n(.*?)^$" --tmp /tmp --silent --debug --print all config barf gag d90 2 a91 2 echo; echo "./rc --conf ./rc_test/myrc.conf --func ./rc_test/rcfuncs -L $RCBASE/rc.d --NameConfig config --ParseSectionDef \"^%(\w+).*?\n(.*?)^$\" --tmp /tmp --silent --debug --eval all config start" ./rc --conf ./rc_test/myrc.conf --func ./rc_test/rcfuncs -L $RCBASE/rc.d --NameConfig config --ParseSectionDef "^%(\w+).*?\n(.*?)^$" --tmp /tmp --silent --debug --eval all config start d93 2 a94 2 echo; echo "./rc --conf ./rc_test/myrc.conf --func ./rc_test/rcfuncs -L $RCBASE/rc.d --NameConfig config --ParseSectionDef \"^%(\w+).*?\n(.*?)^$\" --tmp /tmp --silent --debug --exec all config start" ./rc --conf ./rc_test/myrc.conf --func ./rc_test/rcfuncs -L $RCBASE/rc.d --NameConfig config --ParseSectionDef "^%(\w+).*?\n(.*?)^$" --tmp /tmp --silent --debug --exec all config start d96 2 a97 2 echo; echo "./rc --conf ./rc_test/myrc.conf --func ./rc_test/rcfuncs -L $RCBASE/rc.d --NameConfig config --ParseSectionDef \"%(.+)\" --tmp /tmp --silent --debug --print pam info" ./rc --conf ./rc_test/myrc.conf --func ./rc_test/rcfuncs -L $RCBASE/rc.d --NameConfig config --ParseSectionDef "%(.+)" --tmp /tmp --silent --debug --print pam info d99 2 a100 2 echo; echo "./rc --conf ./rc_test/myrc.conf --func ./rc_test/rcfuncs -L $RCBASE/rc.d --NameConfig config --ParseSectionDef \"%(.+)\" --tmp /tmp --silent --debug --print apache config start" ./rc --conf ./rc_test/myrc.conf --func ./rc_test/rcfuncs -L $RCBASE/rc.d --NameConfig config --ParseSectionDef "%(.+)" --tmp /tmp --silent --debug --print apache config start d102 2 a103 2 echo; echo "./rc --conf ./rc_test/myrc.conf --func ./rc_test/rcfuncs -L ./rc_test/ --NameConfig config --ParseSectionDef \"^<(.+?)\s*.*?>\n*(.*?)^<\/\1>\" --tmp /tmp --silent --debug --print all config start" ./rc --conf ./rc_test/myrc.conf --func ./rc_test/rcfuncs -L ./rc_test/ --NameConfig config --ParseSectionDef "^<(.+?)\s*.*?>\n*(.*?)^<\/\1>" --tmp /tmp --silent --debug --print all config start d105 2 a106 2 echo; echo "./rc --conf ./rc_test/myrc.conf --func ./rc_test/rcfuncs -L ./rc_test/ --NameConfig config --ParseSectionDef \"^<(.+?)\s*.*?>\n*(.*?)^<\/\1>\" --tmp /tmp --silent --debug --print pam info" ./rc --conf ./rc_test/myrc.conf --func ./rc_test/rcfuncs -L ./rc_test/ --NameConfig config --ParseSectionDef "^<(.+?)\s*.*?>\n*(.*?)^<\/\1>" --tmp /tmp --silent --debug --print pam info d108 8 a115 2 echo; echo "./rc --conf ./rc_test/myrc.conf --func $RCBASE/rc.func -L $RCBASE/rc.d/ --NameConfig config --ParseSectionDef \"^%(\w+).*?\n(.*?)^$\" --tmp /tmp --silent --debug --print dhcpd start" ./rc --conf ./rc_test/myrc.conf --func $RCBASE/rc.func -L $RCBASE/rc.d/ --NameConfig config --ParseSectionDef "^%(\w+).*?\n(.*?)^$" --tmp /tmp --silent --debug --print dhcpd start @ 1.17 log @Add conditional instance variable feature. @ text @d45 6 a50 6 echo; echo "./rc --verbose --silent --ParseSectionDef \"%(.+)\" uucp stop sleep=6 start" ./rc --verbose --silent --ParseSectionDef "%(.+)" uucp stop sleep=6 start echo; echo "./rc --query myvar --silent --ParseSectionDef \"%(.+)\" zebra bing bang" ./rc --query myvar --silent --ParseSectionDef "%(.+)" zebra bing bang echo; echo "./rc --conf ./rc.conf --ParseSectionDef \"%(.+)\" --locate ./rc_test/ --query this barf test" ./rc --conf ./rc.conf --ParseSectionDef "%(.+)" --locate ./rc_test/ --query this barf test d53 4 a56 4 echo; echo "./rc --debug --version --ParseSectionDef \"%(.+)\" rsyncd nothing matters but the version" ./rc --debug --version --ParseSectionDef "%" rsyncd nothing matters but the version echo; echo "./rc --conf $RCBASE/rc.conf --ParseSectionDef \"%(.+)\" --locate $RCBASE/rc.d:./rc_test:/etc/rc --query all barf test" ./rc --conf $RCBASE/rc.conf --ParseSectionDef "%(.+)" --locate $RCBASE/rc.d:./rc_test:/etc/rc --query all barf test d71 2 a72 2 echo; echo "./rc --func rc_test/rcfuncs --print --ParseSectionDef \"%(.+)\" --verbose openssh stop sleep=4 start" ./rc --func rc_test/rcfuncs --print --ParseSectionDef "%(.+)" --verbose openssh stop sleep=4 start d75 8 a82 23 echo; echo "./rc --conf rc_test/myrc.conf --func ./rc_test/rcfuncs --tmp /tmp --ParseSectionDef \"%(.+)\" --print uucp start" ./rc --conf rc_test/myrc.conf --func ./rc_test/rcfuncs --tmp /tmp --ParseSectionDef "%(.+)" --print uucp start echo; echo "./rc --conf ./rc_test/myrc.conf --func ./rc_test/rcfuncs --tmp /tmp --debug --ParseSectionDef \"%(.+)\" --print ntp sync" ./rc --conf ./rc_test/myrc.conf --func ./rc_test/rcfuncs --tmp /tmp --debug --ParseSectionDef "%(.+)" --print ntp sync echo; echo "./rc --conf ./rc_test/myrc.conf --func ./rc_test/rcfuncs --tmp /tmp --debug --silent --ParseSectionDef \"%(.+)\" --print ralf feed suppe" ./rc --conf ./rc_test/myrc.conf --func ./rc_test/rcfuncs --tmp /tmp --debug --silent --ParseSectionDef "%(.+)" --print ralf feed suppe echo; echo "./rc --conf ./rc_test/myrc.conf --func ./rc_test/rcfuncs -L rc_test --ParseSectionDef \"%(.+)\" --tmp /tmp --silent --print samba search finish destroy" ./rc --conf ./rc_test/myrc.conf --func ./rc_test/rcfuncs -L rc_test --ParseSectionDef "%(.+)" --tmp /tmp --silent --print samba search finish destroy echo; echo "./rc --conf ./rc_test/myrc.conf --func ./rc_test/rcfuncs -L ./rc_test --ParseSectionDef \"%(.+)\" --tmp /tmp --silent --print all feed suppe" ./rc --conf ./rc_test/myrc.conf --func ./rc_test/rcfuncs -L ./rc_test --ParseSectionDef "%(.+)" --tmp /tmp --silent --print all feed suppe echo; echo "./rc --conf ./rc_test/myrc.conf --func ./rc_test/rcfuncs -L $RCBASE/rc.d --ParseSectionDef \"%(.+)\" --tmp /tmp --silent --debug --print all config barf gag" ./rc --conf ./rc_test/myrc.conf --func ./rc_test/rcfuncs -L $RCBASE/rc.d --ParseSectionDef "%(.+)" --tmp /tmp --silent --debug --print all config barf gag echo; echo "./rc --conf ./rc_test/myrc.conf --func ./rc_test/rcfuncs -L $RCBASE/rc.d --ParseSectionDef \"%(.+)\" --tmp /tmp --silent --debug --eval all config start" ./rc --conf ./rc_test/myrc.conf --func ./rc_test/rcfuncs -L $RCBASE/rc.d --ParseSectionDef "%(.+)" --tmp /tmp --silent --debug --eval all config start echo; echo "./rc --conf ./rc_test/myrc.conf --func ./rc_test/rcfuncs -L $RCBASE/rc.d --ParseSectionDef \"%(.+)\" --tmp /tmp --silent --debug --exec all config start" ./rc --conf ./rc_test/myrc.conf --func ./rc_test/rcfuncs -L $RCBASE/rc.d --ParseSectionDef "%(.+)" --tmp /tmp --silent --debug --exec all config start echo; echo "./rc --conf ./rc_test/myrc.conf --func ./rc_test/rcfuncs -L $RCBASE/rc.d --ParseSectionDef \"%(.+)\" --tmp /tmp --silent --debug --print pam info" ./rc --conf ./rc_test/myrc.conf --func ./rc_test/rcfuncs -L $RCBASE/rc.d --ParseSectionDef "%(.+)" --tmp /tmp --silent --debug --print pam info d84 2 a85 2 echo; echo "./rc --conf ./rc_test/myrc.conf --func ./rc_test/rcfuncs -L $RCBASE/rc.d --ParseSectionDef \"%(.+)\" --tmp /tmp --silent --debug --print apache config start" ./rc --conf ./rc_test/myrc.conf --func ./rc_test/rcfuncs -L $RCBASE/rc.d --ParseSectionDef "%(.+)" --tmp /tmp --silent --debug --print apache config start d87 2 a88 2 echo; echo "./rc --conf ./rc_test/myrc.conf --func ./rc_test/rcfuncs -L ./rc_test/ --ParseSectionDef \"<(.+)>\" --tmp /tmp --silent --debug --print all config start" ./rc --conf ./rc_test/myrc.conf --func ./rc_test/rcfuncs -L ./rc_test/ --ParseSectionDef "<(.+)>" --tmp /tmp --silent --debug --print all config start d90 20 a109 2 echo; echo "./rc --conf ./rc_test/myrc.conf --func ./rc_test/rcfuncs -L ./rc_test/ --ParseSectionDef \"<(.+)>\" --tmp /tmp --silent --debug --print pam info" ./rc --conf ./rc_test/myrc.conf --func ./rc_test/rcfuncs -L ./rc_test/ --ParseSectionDef "<(.+)>" --tmp /tmp --silent --debug --print pam info @ 1.16 log @Make the test suite at least generic enough so that OSSP rc can be tested on any machine with an OpenPKG repository. @ text @d30 6 d49 2 a50 2 echo; echo "./rc --conf /usr/opkg/etc/rc.conf --ParseSectionDef \"%(.+)\" --locate ./rc_test/ --query this barf test" ./rc --conf /usr/opkg/etc/rc.conf --ParseSectionDef "%(.+)" --locate ./rc_test/ --query this barf test d55 2 a56 2 echo; echo "./rc --conf /usr/opkg/etc/rc.conf --ParseSectionDef \"%(.+)\" --locate /usr/opkg/etc/rc.d:./rc_test:/etc/rc --query all barf test" ./rc --conf /usr/opkg/etc/rc.conf --ParseSectionDef "%(.+)" --locate /usr/opkg/etc/rc.d:./rc_test:/etc/rc --query all barf test d67 2 a68 2 #echo; echo "./rc --conf /usr/opkg/etc/rc.conf --tmp /tmp --debug --labels rsyncd" #./rc --conf /usr/opkg/etc/rc.conf --tmp /tmp --debug --labels rsyncd d87 2 a88 2 echo; echo "./rc --conf ./rc_test/myrc.conf --func ./rc_test/rcfuncs -L /usr/opkg/etc/rc.d --ParseSectionDef \"%(.+)\" --tmp /tmp --silent --debug --print all config barf gag" ./rc --conf ./rc_test/myrc.conf --func ./rc_test/rcfuncs -L /usr/opkg/etc/rc.d --ParseSectionDef "%(.+)" --tmp /tmp --silent --debug --print all config barf gag d90 2 a91 2 echo; echo "./rc --conf ./rc_test/myrc.conf --func ./rc_test/rcfuncs -L /usr/opkg/etc/rc.d --ParseSectionDef \"%(.+)\" --tmp /tmp --silent --debug --eval all config start" ./rc --conf ./rc_test/myrc.conf --func ./rc_test/rcfuncs -L /usr/opkg/etc/rc.d --ParseSectionDef "%(.+)" --tmp /tmp --silent --debug --eval all config start d93 2 a94 2 echo; echo "./rc --conf ./rc_test/myrc.conf --func ./rc_test/rcfuncs -L /usr/opkg/etc/rc.d --ParseSectionDef \"%(.+)\" --tmp /tmp --silent --debug --exec all config start" ./rc --conf ./rc_test/myrc.conf --func ./rc_test/rcfuncs -L /usr/opkg/etc/rc.d --ParseSectionDef "%(.+)" --tmp /tmp --silent --debug --exec all config start d96 2 a97 2 echo; echo "./rc --conf ./rc_test/myrc.conf --func ./rc_test/rcfuncs -L /usr/opkg/etc/rc.d --ParseSectionDef \"%(.+)\" --tmp /tmp --silent --debug --print pam info" ./rc --conf ./rc_test/myrc.conf --func ./rc_test/rcfuncs -L /usr/opkg/etc/rc.d --ParseSectionDef "%(.+)" --tmp /tmp --silent --debug --print pam info d99 2 a100 2 echo; echo "./rc --conf ./rc_test/myrc.conf --func ./rc_test/rcfuncs -L /usr/opkg/etc/rc.d --ParseSectionDef \"%(.+)\" --tmp /tmp --silent --debug --print apache config start" ./rc --conf ./rc_test/myrc.conf --func ./rc_test/rcfuncs -L /usr/opkg/etc/rc.d --ParseSectionDef "%(.+)" --tmp /tmp --silent --debug --print apache config start @ 1.15 log @Added pattern usage to the test script. @ text @d31 2 a32 2 #echo "./rc -dvef rcfunc/rc.func -hilpsrvxLcqt samba start sleep=2 restart" #./rc -dVef rcfunc/rc.func -hilpsrvxLcqt samba start sleep=2 restart d35 2 a36 2 #echo; echo "./rc -derv -L /u/ms/ossp/rc/rcdings/rcfiles/rc.%{RCFILE:s/^all$/*/} -c /u/ms/ossp/rc/rcdings/rc.conf -f /u/ms/ossp/rc/rcfunc/rc.func -t /tmp openssh stop sleep=4 start daily minsize=2097152" #./rc -derv -L /u/ms/ossp/rc/rcdings/rcfiles/rc.d/rc.%{RCFILE:s/^all$/*/} -c /u/ms/ossp/rc/rcdings/rc.conf -f /u/ms/ossp/rc/rcfunc/rc.func -t /tmp openssh stop sleep=4 start daily minsize=2097152 d43 2 a44 2 echo; echo "./rc --conf /sfw/rc.conf --ParseSectionDef \"%(.+)\" --locate /u/ms/ossp/rc/rcdings/rcfiles/ --query this barf test" ./rc --conf /sfw/rc.conf --ParseSectionDef "%(.+)" --locate /u/ms/ossp/rc/rcdings/rcfiles/ --query this barf test d49 2 a50 2 echo; echo "./rc --conf /sfw/rc.conf --ParseSectionDef \"%(.+)\" --locate /cw/etc/rc.d:/u/ms/ossp/rc/rcdings/rcfiles:/etc/rc --query all barf test" ./rc --conf /sfw/rc.conf --ParseSectionDef "%(.+)" --locate /cw/etc/rc.d:/u/ms/ossp/rc/rcdings/rcfiles:/etc/rc --query all barf test d61 2 a62 2 #echo; echo "./rc --conf /sfw/rc.conf --tmp /sfw/RPM/TMP --debug --labels rsyncd" #./rc --conf /sfw/rc.conf --tmp /sfw/RPM/TMP --debug --labels rsyncd d65 27 a91 27 echo; echo "./rc --func /u/ms/ossp/rc/rcfunc/rc.func --print --ParseSectionDef \"%(.+)\" --verbose openssh stop sleep=4 start" ./rc --func /u/ms/ossp/rc/rcfunc/rc.func --print --ParseSectionDef "%(.+)" --verbose openssh stop sleep=4 start echo; echo "./rc --func /u/ms/ossp/rc/rcfunc/rc.func --info --eval uucp restart" ./rc --func /u/ms/ossp/rc/rcfunc/rc.func --info --eval uucp restart echo; echo "./rc --conf rcdings/myrc.conf --func /u/ms/ossp/rc/rcfunc/rc.func --tmp /tmp --ParseSectionDef \"%(.+)\" --print uucp start" ./rc --conf rcdings/myrc.conf --func /u/ms/ossp/rc/rcfunc/rc.func --tmp /tmp --ParseSectionDef "%(.+)" --print uucp start echo; echo "./rc --conf rcdings/myrc.conf --func /u/ms/ossp/rc/rcfunc/rc.func --tmp /tmp --debug --ParseSectionDef \"%(.+)\" --print ntp sync" ./rc --conf rcdings/myrc.conf --func /u/ms/ossp/rc/rcfunc/rc.func --tmp /tmp --debug --ParseSectionDef "%(.+)" --print ntp sync echo; echo "./rc --conf rcdings/myrc.conf --func /u/ms/ossp/rc/rcfunc/rc.func --tmp /tmp --debug --silent --ParseSectionDef \"%(.+)\" --print ralf feed suppe" ./rc --conf rcdings/myrc.conf --func /u/ms/ossp/rc/rcfunc/rc.func --tmp /tmp --debug --silent --ParseSectionDef "%(.+)" --print ralf feed suppe echo; echo "./rc --conf rcdings/myrc.conf --func /u/ms/ossp/rc/rcfunc/rc.func -L /u/ms/ossp/rc/rcfiles/ --ParseSectionDef \"%(.+)\" --tmp /tmp --silent --print samba search finish destroy" ./rc --conf rcdings/myrc.conf --func /u/ms/ossp/rc/rcfunc/rc.func -L /u/ms/ossp/rc/rcfiles/ --ParseSectionDef "%(.+)" --tmp /tmp --silent --print samba search finish destroy echo; echo "./rc --conf rcdings/myrc.conf --func /u/ms/ossp/rc/rcfunc/rc.func -L /u/ms/ossp/rc/rcfiles/ --ParseSectionDef \"%(.+)\" --tmp /tmp --silent --print all feed suppe" ./rc --conf rcdings/myrc.conf --func /u/ms/ossp/rc/rcfunc/rc.func -L /u/ms/ossp/rc/rcfiles/ --ParseSectionDef "%(.+)" --tmp /tmp --silent --print all feed suppe echo; echo "./rc --conf rcdings/myrc.conf --func /u/ms/ossp/rc/rcfunc/rc.func -L /sw/etc/rc.d --ParseSectionDef \"%(.+)\" --tmp /tmp --silent --debug --print all config barf gag" ./rc --conf rcdings/myrc.conf --func /u/ms/ossp/rc/rcfunc/rc.func -L /sw/etc/rc.d --ParseSectionDef "%(.+)" --tmp /tmp --silent --debug --print all config barf gag echo; echo "./rc --conf rcdings/myrc.conf --func /u/ms/ossp/rc/rcfunc/rc.func -L /sw/etc/rc.d --ParseSectionDef \"%(.+)\" --tmp /tmp --silent --debug --eval all config start" ./rc --conf rcdings/myrc.conf --func /u/ms/ossp/rc/rcfunc/rc.func -L /sw/etc/rc.d --ParseSectionDef "%(.+)" --tmp /tmp --silent --debug --eval all config start echo; echo "./rc --conf rcdings/myrc.conf --func /u/ms/ossp/rc/rcfunc/rc.func -L /sw/etc/rc.d --ParseSectionDef \"%(.+)\" --tmp /tmp --silent --debug --exec all config start" ./rc --conf rcdings/myrc.conf --func /u/ms/ossp/rc/rcfunc/rc.func -L /sw/etc/rc.d --ParseSectionDef "%(.+)" --tmp /tmp --silent --debug --exec all config start echo; echo "./rc --conf rcdings/myrc.conf --func /u/ms/ossp/rc/rcfunc/rc.func -L /sw/etc/rc.d --ParseSectionDef \"%(.+)\" --tmp /tmp --silent --debug --print pam info" ./rc --conf rcdings/myrc.conf --func /u/ms/ossp/rc/rcfunc/rc.func -L /sw/etc/rc.d --ParseSectionDef "%(.+)" --tmp /tmp --silent --debug --print pam info d93 2 a94 2 echo; echo "./rc --conf rcdings/myrc.conf --func /u/ms/ossp/rc/rcfunc/rc.func -L /sw/etc/rc.d --ParseSectionDef \"%(.+)\" --tmp /tmp --silent --debug --print apache config start" ./rc --conf rcdings/myrc.conf --func /u/ms/ossp/rc/rcfunc/rc.func -L /sw/etc/rc.d --ParseSectionDef "%(.+)" --tmp /tmp --silent --debug --print apache config start d96 2 a97 2 echo; echo "./rc --conf rcdings/myrc.conf --func /u/ms/ossp/rc/rcfunc/rc.func -L /u/ms/ossp/rc/rcfiles/ --ParseSectionDef \"<(.+)>\" --tmp /tmp --silent --debug --print all config start" ./rc --conf rcdings/myrc.conf --func /u/ms/ossp/rc/rcfunc/rc.func -L /u/ms/ossp/rc/rcfiles/ --ParseSectionDef "<(.+)>" --tmp /tmp --silent --debug --print all config start d99 2 a100 2 echo; echo "./rc --conf rcdings/myrc.conf --func /u/ms/ossp/rc/rcfunc/rc.func -L /u/ms/ossp/rc/rcfiles/ --ParseSectionDef \"<(.+)>\" --tmp /tmp --silent --debug --print pam info" ./rc --conf rcdings/myrc.conf --func /u/ms/ossp/rc/rcfunc/rc.func -L /u/ms/ossp/rc/rcfiles/ --ParseSectionDef "<(.+)>" --tmp /tmp --silent --debug --print pam info @ 1.14 log @Wrote configInfo, removed config debugging, prepared procRun for eval/exec/print logic, and improved test conditions. @ text @d39 6 a44 6 echo; echo "./rc --verbose --silent uucp stop sleep=6 start" ./rc --verbose --silent uucp stop sleep=6 start echo; echo "./rc --query myvar --silent zebra bing bang" ./rc --query myvar --silent zebra bing bang echo; echo "./rc --conf /sfw/rc.conf --locate /u/ms/ossp/rc/rcdings/rcfiles/ --query this barf test" ./rc --conf /sfw/rc.conf --locate /u/ms/ossp/rc/rcdings/rcfiles/ --query this barf test d47 4 a50 4 echo; echo "./rc --debug --version rsyncd nothing matters but the version" ./rc --debug --version rsyncd nothing matters but the version echo; echo "./rc --conf /sfw/rc.conf --locate /cw/etc/rc.d:/u/ms/ossp/rc/rcdings/rcfiles:/etc/rc --query all barf test" ./rc --conf /sfw/rc.conf --locate /cw/etc/rc.d:/u/ms/ossp/rc/rcdings/rcfiles:/etc/rc --query all barf test d65 2 a66 2 echo; echo "./rc --func /u/ms/ossp/rc/rcfunc/rc.func --print --verbose openssh stop sleep=4 start" ./rc --func /u/ms/ossp/rc/rcfunc/rc.func --print --verbose openssh stop sleep=4 start d69 23 a91 14 echo; echo "./rc --conf rcdings/myrc.conf --func /u/ms/ossp/rc/rcfunc/rc.func --tmp /tmp --print uucp start" ./rc --conf rcdings/myrc.conf --func /u/ms/ossp/rc/rcfunc/rc.func --tmp /tmp --print uucp start echo; echo "./rc --conf rcdings/myrc.conf --func /u/ms/ossp/rc/rcfunc/rc.func --tmp /tmp --debug --print ntp sync" ./rc --conf rcdings/myrc.conf --func /u/ms/ossp/rc/rcfunc/rc.func --tmp /tmp --debug --print ntp sync echo; echo "./rc --conf rcdings/myrc.conf --func /u/ms/ossp/rc/rcfunc/rc.func --tmp /tmp --debug --silent --print ralf feed suppe" ./rc --conf rcdings/myrc.conf --func /u/ms/ossp/rc/rcfunc/rc.func --tmp /tmp --debug --silent --print ralf feed suppe echo; echo "./rc --conf rcdings/myrc.conf --func /u/ms/ossp/rc/rcfunc/rc.func -L /u/ms/ossp/rc/rcfiles/ --tmp /tmp --silent --print samba search finish destroy" ./rc --conf rcdings/myrc.conf --func /u/ms/ossp/rc/rcfunc/rc.func -L /u/ms/ossp/rc/rcfiles/ --tmp /tmp --silent --print samba search finish destroy echo; echo "./rc --conf rcdings/myrc.conf --func /u/ms/ossp/rc/rcfunc/rc.func -L /u/ms/ossp/rc/rcfiles/ --tmp /tmp --silent --print all feed suppe" ./rc --conf rcdings/myrc.conf --func /u/ms/ossp/rc/rcfunc/rc.func -L /u/ms/ossp/rc/rcfiles/ --tmp /tmp --silent --print all go feed suppe echo; echo "./rc --conf rcdings/myrc.conf --func /u/ms/ossp/rc/rcfunc/rc.func -L /sw/etc/rc.d --tmp /tmp --silent --debug --print all config barf gag" ./rc --conf rcdings/myrc.conf --func /u/ms/ossp/rc/rcfunc/rc.func -L /sw/etc/rc.d --tmp /tmp --silent --debug --print all config barf gag d93 2 a94 2 echo; echo "./rc --conf rcdings/myrc.conf --func /u/ms/ossp/rc/rcfunc/rc.func -L /sw/etc/rc.d --tmp /tmp --silent --debug --eval all config start" ./rc --conf rcdings/myrc.conf --func /u/ms/ossp/rc/rcfunc/rc.func -L /sw/etc/rc.d --tmp /tmp --silent --debug --eval all config start d96 2 a97 2 echo; echo "./rc --conf rcdings/myrc.conf --func /u/ms/ossp/rc/rcfunc/rc.func -L /sw/etc/rc.d --tmp /tmp --silent --debug --exec all config start" ./rc --conf rcdings/myrc.conf --func /u/ms/ossp/rc/rcfunc/rc.func -L /sw/etc/rc.d --tmp /tmp --silent --debug --exec all config start d99 2 a100 2 echo; echo "./rc --conf rcdings/myrc.conf --func /u/ms/ossp/rc/rcfunc/rc.func -L /sw/etc/rc.d --tmp /tmp --silent --debug --print pam info" ./rc --conf rcdings/myrc.conf --func /u/ms/ossp/rc/rcfunc/rc.func -L /sw/etc/rc.d --tmp /tmp --silent --debug --print pam info @ 1.13 log @Improved section parsing and added back most error condition logic. All combinations of wildcard globbing, multiple section parsing, and error handling now work (except for a problem relating to or using ex). @ text @d67 10 a76 11 echo; echo "./rc --func /u/ms/ossp/rc/rcfunc/rc.func --debug --eval uucp restart" ./rc --func /u/ms/ossp/rc/rcfunc/rc.func --debug --eval uucp restart echo; echo "./rc --conf rcdings/myrc.conf --func /u/ms/ossp/rc/rcfunc/rc.func --tmp /tmp --exec uucp start" ./rc --conf rcdings/myrc.conf --func /u/ms/ossp/rc/rcfunc/rc.func --tmp /tmp --exec uucp start echo; echo "./rc --conf rcdings/myrc.conf --func /u/ms/ossp/rc/rcfunc/rc.func --tmp /tmp --debug --exec ntp sync" ./rc --conf rcdings/myrc.conf --func /u/ms/ossp/rc/rcfunc/rc.func --tmp /tmp --debug --exec ntp sync echo; echo "./rc --conf rcdings/myrc.conf --func /u/ms/ossp/rc/rcfunc/rc.func --tmp /tmp --debug --silent --exec ralf feed suppe" ./rc --conf rcdings/myrc.conf --func /u/ms/ossp/rc/rcfunc/rc.func --tmp /tmp --debug --silent --exec ralf feed suppe echo; echo "./rc --conf rcdings/myrc.conf --func /u/ms/ossp/rc/rcfunc/rc.func -L /u/ms/ossp/rc/rcfiles/ --tmp /tmp --silent --exec samba search finish destroy" ./rc --conf rcdings/myrc.conf --func /u/ms/ossp/rc/rcfunc/rc.func -L /u/ms/ossp/rc/rcfiles/ --tmp /tmp --silent --exec samba search finish destroy d78 2 a79 2 echo; echo "./rc --conf rcdings/myrc.conf --func /u/ms/ossp/rc/rcfunc/rc.func -L /u/ms/ossp/rc/rcfiles/ --tmp /tmp --silent --exec all feed suppe" ./rc --conf rcdings/myrc.conf --func /u/ms/ossp/rc/rcfunc/rc.func -L /u/ms/ossp/rc/rcfiles/ --tmp /tmp --silent --exec all go feed suppe d81 5 a85 2 echo; echo "./rc --conf rcdings/myrc.conf --func /u/ms/ossp/rc/rcfunc/rc.func -L /sw/etc/rc.d --tmp /tmp --silent --debug --exec all config barf gag" ./rc --conf rcdings/myrc.conf --func /u/ms/ossp/rc/rcfunc/rc.func -L /sw/etc/rc.d --tmp /tmp --silent --debug --exec all config barf gag d90 2 a91 2 echo; echo "./rc --conf rcdings/myrc.conf --func /u/ms/ossp/rc/rcfunc/rc.func -L /sw/etc/rc.d --tmp /tmp --silent --debug --exec pam info" ./rc --conf rcdings/myrc.conf --func /u/ms/ossp/rc/rcfunc/rc.func -L /sw/etc/rc.d --tmp /tmp --silent --debug --exec pam info @ 1.12 log @Added 'all' wildcard rcfile globbing and removed location hardcoding and rcfile prefix hardcoding. @ text @d31 2 a32 2 echo "./rc -dvef rcfunc/rc.func -hilpsrvxLcqt samba start sleep=2 restart" ./rc -dVef rcfunc/rc.func -hilpsrvxLcqt samba start sleep=2 restart d35 2 a36 2 echo; echo "./rc -derv -L /u/ms/ossp/rc/rcdings/rcfiles/rc.%{RCFILE:s/^all$/*/} -c /u/ms/ossp/rc/rcdings/rc.conf -f /u/ms/ossp/rc/rcfunc/rc.func -t /tmp openssh stop sleep=4 start daily minsize=2097152" ./rc -derv -L /u/ms/ossp/rc/rcdings/rcfiles/rc.d/rc.%{RCFILE:s/^all$/*/} -c /u/ms/ossp/rc/rcdings/rc.conf -f /u/ms/ossp/rc/rcfunc/rc.func -t /tmp openssh stop sleep=4 start daily minsize=2097152 d75 4 d80 10 a89 1 ./rc --conf rcdings/myrc.conf --func /u/ms/ossp/rc/rcfunc/rc.func -L /u/ms/ossp/rc/rcfiles/ --tmp /tmp --silent --exec all feed suppe @ 1.11 log @Intermediate committal, lots of additions, compiles and works very limited. @ text @d49 2 a50 2 echo; echo "./rc --conf /sfw/rc.conf --locate /cw/etc/rc.d:/u/ms/ossp/rc/rcdings/rcfiles:/etc/rc --query this barf test" ./rc --conf /sfw/rc.conf --locate /cw/etc/rc.d:/u/ms/ossp/rc/rcdings/rcfiles:/etc/rc --query this barf test d75 2 @ 1.10 log @Fix the build, comment missing pieces, and synchronize throughout. @ text @d31 2 a32 2 echo "./rc -dVehilpsrvxLcfqt samba start sleep=2 restart" ./rc -dVehilpsrvxLcfqt samba start sleep=2 restart d35 2 a36 2 echo; echo "./rc -derv -L /sfw/etc/rc.d/rc.%{RCFILE:s/^all$/*/} -c /sfw/etc/rc.conf -f /sfw/etc/rc.func -t /tmp openssh stop sleep=4 start daily minsize=2097152" ./rc -derv -L /sfw/etc/rc.d/rc.%{RCFILE:s/^all$/*/} -c /sfw/etc/rc.conf -f /sfw/etc/rc.func -t /tmp openssh stop sleep=4 start daily minsize=2097152 d43 2 a44 2 echo; echo "./rc --conf /sfw/rc.conf --locate /etc/rc3.d:/sfw/etc/rc.d --query what to enter here" ./rc --conf /sfw/rc.conf --locate /etc/rc3.d:/sfw/etc/rc.d --query what to enter here d49 2 a50 2 echo; echo "./rc --conf /sfw/rc.conf --locate /cw/etc/rc.d:/sfw/etc/rc.d:/etc/rc --query what to enter here" ./rc --conf /sfw/rc.conf --locate /cw/etc/rc.d:/sfw/etc/rc.d:/etc/rc --query what to enter here d65 10 a74 6 echo; echo "./rc --func /sfw/etc/rc.func --print --verbose openssh stop sleep=4 start" ./rc --func /sfw/etc/rc.func --print --verbose openssh stop sleep=4 start echo; echo "./rc --func /sfw/etc/rc.func --debug --eval uucp restart" ./rc --func /sfw/etc/rc.func --debug --eval uucp restart echo; echo "./rc --conf ./myrc --func /sfw/etc/rc.func --tmp /tmp --debug --silent --exec uucp start" ./rc --conf ./myrc --func /sfw/etc/rc.func --tmp /tmp --debug --silent --exec uucp start @ 1.9 log @Rearranged test commands and added comments to option identifiers. @ text @d41 2 a42 2 echo; echo "./rc --query --silent zebra bing bang" ./rc --query --silent zebra bing bang @ 1.8 log @Flush configuration and parsing work. @ text @d31 1 a32 1 echo "./rc -dVehilpsrvxLcfqt samba start sleep=2 restart" d35 1 a36 1 echo; echo "./rc -derv -L /sfw/etc/rc.d/rc.%{RCFILE:s/^all$/*/} -c /sfw/etc/rc.conf -f /sfw/etc/rc.func -t /tmp openssh stop sleep=4 start daily minsize=2097152" d39 1 d41 1 a41 1 echo; echo "./rc --verbose --silent uucp stop sleep=6 start" d43 2 a44 3 echo; echo "./rc --query --silent zebra bing bang" ./rc --conf /sfw/rc.conf --locate /sfw/etc/rc.d --query what to enter here echo; echo "./rc --conf /sfw/rc.conf --locate /sfw/etc/rc.d --query what to enter here" d47 1 d49 2 a50 1 echo; echo "./rc --conf /sfw/rc.conf --locate /sfw/etc/rc.d --query what to enter here" d53 1 d55 1 a55 1 #echo; echo "./rc --debug --version" d57 1 a57 1 #echo; echo "./rc --debug --help" d59 1 a59 1 #echo; echo "./rc --debug --info --verbose" d61 1 a61 1 #echo; echo "./rc --conf /etc/rc.conf --debug --info --raw" a62 1 #echo; echo "./rc --conf /sfw/rc.conf --tmp /sfw/RPM/TMP --debug --labels rsyncd" d65 1 d67 1 a67 1 echo; echo "./rc --func /sfw/etc/rc.func --print --verbose openssh stop sleep=4 start" d69 1 a69 1 echo; echo "./rc --func /sfw/etc/rc.func --debug --eval uucp restart" a70 1 echo; echo "./rc --conf ./myrc --func /sfw/etc/rc.func --tmp /tmp --debug --silent --exec uucp start" @ 1.7 log @Flush the toilet. @ text @d32 1 d36 1 d40 1 d42 1 d44 1 d48 1 d52 1 a52 1 #echo d54 1 a54 1 #echo d56 1 a56 1 #echo d58 1 a58 1 #echo d60 1 a60 1 #echo d64 1 d66 1 d68 1 @ 1.6 log @Vacation flush, mostly build configuration details. Its not building very clean right now. @ text @a31 1 echo a34 1 echo a37 1 echo a38 1 echo a39 1 echo a42 1 echo a57 1 echo a58 1 echo @ 1.5 log @Move test cases out of test script and into 00TODO, write real test scripts. PR: Submitted by: Reviewed by: Approved by: Obtained from: @ text @d2 2 a3 1 # rc - OSSP Run-command processor a5 1 # Copyright (c) 2002 Ralf S. Engelschall d8 1 a8 1 # which can be found at http://www.ossp.org/pkg/rc/ @ 1.4 log @Fixed copyright. PR: Submitted by: Reviewed by: Approved by: Obtained from: @ text @d30 52 a81 23 #Pre: #tar zxvf ossprc-0.9.tar.gz #cd ossprc-0.9 #./configure #make #su #make install #export OSSP_RC_ROOT=/etc/ossprc/ # #Assume: #Installed program 'mycom' in /usr/local/bin/mycom #Valid OSSP run command file rc.mycom in /etc/ossprc/rc.d #File rc.mycom contains the sections start, sync, and restart # #Begin: #$ rc mycom start sync restart # #Output: # #Post: # #Procedure: # @ 1.3 log @Refresh current project state, add OSSP ex library, corrections. PR: Submitted by: Reviewed by: Approved by: Obtained from: @ text @d2 1 a2 1 # rc - OSSP Runcommand processor d7 1 a7 1 # This file is part of OSSP rc, a portable Runcommand processor d28 1 a28 1 # test_rc.sh: Runcommand processor test script @ 1.2 log @Remove automake macros. PR: Submitted by: Reviewed by: Approved by: Obtained from: @ text @a52 18 #foreach sec in
[
...] { # foreach dir in --dir=dir1:dir2:.. { # search for --rcfile where %s is # parse rcfile into blocks according to --regex-section/etc. # remember common/
into list # } # // we now have an unsorted list of common/
# sort list of common/
according to their priority (see --regex-param) # # // execution # forearch common/
in list { # prepend config section # prepend common section # expand references accordingf to --regex-reference # execute result as user/group (see --regex-param) with interpreter (see --regex-param) # } #} # @ 1.1 log @Second birth of project OSSP rc. PR: Submitted by: Reviewed by: Approved by: Obtained from: @ text @d30 41 a70 1 echo "Eat a OSSP frog" @