#! /bin/sh # OSSP rc - Run-command processor # Copyright (c) 2002 Ralf S. Engelschall # Copyright (c) 2002 Cable & Wireless Deutschland GmbH # Copyright (c) 2002 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 # Test short options, should fail for false combination usage ./rc -dVehilpsrvxLcfqt samba start sleep=2 restart # Test short options, should succeed ./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 # Test some long options, should fail for false combination usage ./rc --verbose --silent uucp stop sleep=6 start ./rc --query --silent zebra bing bang ./rc --conf /sfw/rc.conf --locate /sfw/etc/rc.d --query what to enter here # Test minimal set of long options, should succeed ./rc --debug --version rsyncd nothing matters but the version # FIXME these cases are not handled yet by our configuration FIXME # #./rc --debug --version #echo #./rc --debug --help #echo #./rc --debug --info --verbose #echo #./rc --conf /etc/rc.conf --debug --info --raw #echo #./rc --conf /sfw/rc.conf --tmp /sfw/RPM/TMP --debug --labels rsyncd #echo # FIXME these cases are not handled yet by our configuration FIXME # ./rc --func /sfw/etc/rc.func --print --verbose openssh stop sleep=4 start ./rc --func /sfw/etc/rc.func --debug --eval uucp restart ./rc --conf ./myrc --func /sfw/etc/rc.func --tmp /tmp --debug --silent --exec uucp start # Next milestone #RequireOwner #RequireGroup #RequireUmask #ParseEnvAss #ParseSectionDef #ParseSectionRef #ParseSectionParam #ParseTerminal #NameConfig #NameCommon #NameDefault #NameError