Index: ossp-pkg/rc/rc_test.sh RCS File: /v/ossp/cvs/ossp-pkg/rc/rc_test.sh,v rcsdiff -q -kk '-r1.16' '-r1.17' -u '/v/ossp/cvs/ossp-pkg/rc/rc_test.sh,v' 2>/dev/null --- rc_test.sh 2002/07/05 11:16:20 1.16 +++ rc_test.sh 2002/07/05 12:07:01 1.17 @@ -27,6 +27,12 @@ # # test_rc.sh: Run-command processor test script +if [ -d $MOPKG/etc ]; then + RCBASE=$MOPKG/etc +else + RCBASE=/usr/opkg/etc +fi + # 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 @@ -40,14 +46,14 @@ ./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 /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 +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 # Test minimal set of long options, should succeed 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 /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 +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 # FIXME these cases are not handled yet by our configuration FIXME # #echo; echo "./rc --debug --version" @@ -58,8 +64,8 @@ #./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 /usr/opkg/etc/rc.conf --tmp /tmp --debug --labels rsyncd" -#./rc --conf /usr/opkg/etc/rc.conf --tmp /tmp --debug --labels rsyncd +#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 --print --ParseSectionDef \"%(.+)\" --verbose openssh stop sleep=4 start" @@ -78,20 +84,20 @@ 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 /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 +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 /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 +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 /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 +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 /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 +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 -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 +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 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