Index: ossp-pkg/rc/00TODO RCS File: /v/ossp/cvs/ossp-pkg/rc/00TODO,v rcsdiff -q -kk '-r1.34' '-r1.35' -u '/v/ossp/cvs/ossp-pkg/rc/00TODO,v' 2>/dev/null --- 00TODO 2002/08/01 11:59:55 1.34 +++ 00TODO 2002/08/01 13:25:32 1.35 @@ -22,6 +22,7 @@ Document Refs, pri, user, group, ci, go only in normal (not special) sections. + Section definition regular expressions need to follow a format ()\2. Questions Should location regex specify a directory and prefix separately, or files*? Index: ossp-pkg/rc/rc_const.h RCS File: /v/ossp/cvs/ossp-pkg/rc/rc_const.h,v rcsdiff -q -kk '-r1.11' '-r1.12' -u '/v/ossp/cvs/ossp-pkg/rc/rc_const.h,v' 2>/dev/null --- rc_const.h 2002/08/01 08:09:04 1.11 +++ rc_const.h 2002/08/01 13:25:32 1.12 @@ -123,7 +123,7 @@ /* Default values, do not include newlines and special chars must be escaped */ #define RC_DEF_ON "1" /* Digital switch */ #define RC_DEF_OFF "0" /* Digital switch */ -#define RC_DEF_DEF "^%(\\w+).*?\\n(.*?)^$" /* Section definition */ +#define RC_DEF_DEF "^%(\\w+)[ \t]*(.*?)\\n(.*?)^$" /* Section definition */ #define RC_DEF_NCF "config" /* Config section name */ #endif /* __OSSPRC_CONST_H__ */ Index: ossp-pkg/rc/rc_script.c RCS File: /v/ossp/cvs/ossp-pkg/rc/rc_script.c,v rcsdiff -q -kk '-r1.8' '-r1.9' -u '/v/ossp/cvs/ossp-pkg/rc/rc_script.c,v' 2>/dev/null --- rc_script.c 2002/07/30 16:36:41 1.8 +++ rc_script.c 2002/08/01 13:25:32 1.9 @@ -156,8 +156,8 @@ /* Test the substring. If it matches our label, generate a subscript */ if (!strncmp(piLabstart, kszSecname, nLabsize)) { - piStart = piBlocend + *(pnVec + 4); - piEnd = piBlocend + *(pnVec + 5); + piStart = piBlocend + *(pnVec + 6); + piEnd = piBlocend + *(pnVec + 7); szTempout = malloc(piEnd - piStart + sizeof(char)); strncpy(szTempout, piStart, piEnd - piStart); *(szTempout + (piEnd - piStart)) = NULL; /* Terminate outgoing */ Index: ossp-pkg/rc/rc_test.sh RCS File: /v/ossp/cvs/ossp-pkg/rc/rc_test.sh,v rcsdiff -q -kk '-r1.20' '-r1.21' -u '/v/ossp/cvs/ossp-pkg/rc/rc_test.sh,v' 2>/dev/null --- rc_test.sh 2002/07/30 16:36:41 1.20 +++ rc_test.sh 2002/08/01 13:25:32 1.21 @@ -42,18 +42,18 @@ #./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 -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 +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 +echo; echo "./rc --query myvar --silent --ParseSectionDef \"^%(\w+)[ \t]*(.*?)\n(.*?)^$\" zebra bing bang" +./rc --query myvar --silent --ParseSectionDef "^%(\w+)[ \t]*(.*?)\n(.*?)^$" zebra bing bang +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 # Test minimal set of long options, should succeed -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 +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 +echo; 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 # FIXME these cases are not handled yet by our configuration FIXME # #echo; echo "./rc --debug --version" @@ -68,30 +68,30 @@ #./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+).*?\n(.*?)^$\" --verbose openssh stop sleep=4 start" -./rc --func rc_test/rcfuncs --ParseSectionDef "^%(\w+).*?\n(.*?)^$" --verbose openssh stop sleep=4 start +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 echo; echo "./rc --func ./rc_test/rcfuncs --info --eval uucp restart" ./rc --func ./rc_test/rcfuncs --info --eval uucp restart -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 +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 +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 +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 +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 + +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 -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 +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 -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 +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 -#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 +#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 @@ -99,17 +99,17 @@ 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 -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 +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 -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 +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 -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 +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 -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 +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 echo; echo "./rc --func ./rc_test/rcfuncs -L ./rc_test/ dhcpd stop" ./rc --func ./rc_test/rcfuncs -L ./rc_test/ dhcpd stop Index: ossp-pkg/rc/rc_test/rc.pam RCS File: /v/ossp/cvs/ossp-pkg/rc/rc_test/rc.pam,v rcsdiff -q -kk '-r1.2' '-r1.3' -u '/v/ossp/cvs/ossp-pkg/rc/rc_test/rc.pam,v' 2>/dev/null --- rc.pam 2002/07/10 19:04:52 1.2 +++ rc.pam 2002/08/01 13:25:33 1.3 @@ -21,3 +21,10 @@ echo "PAM Include Directory: ${pam_incdir}" echo "PAM Library Directory: ${pam_libdir}" + + + + echo "Nada, just trying out the autre label with bif and borchert as options" + echo + +