From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3783 invoked by alias); 11 Sep 2009 07:22:27 -0000 Received: (qmail 3485 invoked by alias); 11 Sep 2009 07:22:26 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS X-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS X-Spam-Check-By: sourceware.org X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bastion2.fedora.phx.redhat.com Subject: cluster: STABLE3 - config validation: clean up last bits To: cluster-cvs-relay@redhat.com X-Project: Cluster Project X-Git-Module: cluster.git X-Git-Refname: refs/heads/STABLE3 X-Git-Reftype: branch X-Git-Oldrev: d4610c81e3550332b0a5b64d819b458d9e2e4eb4 X-Git-Newrev: b25166629f95f0e3a4e0cd527fb17f25e8ca1699 From: "Fabio M. Di Nitto" Message-Id: <20090911072158.87034120377@lists.fedorahosted.org> Date: Fri, 11 Sep 2009 07:22:00 -0000 X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12 Mailing-List: contact cluster-cvs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: cluster-cvs-owner@sourceware.org X-SW-Source: 2009-q3/txt/msg00337.txt.bz2 Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=b25166629f95f0e3a4e0cd527fb17f25e8ca1699 Commit: b25166629f95f0e3a4e0cd527fb17f25e8ca1699 Parent: d4610c81e3550332b0a5b64d819b458d9e2e4eb4 Author: Fabio M. Di Nitto AuthorDate: Fri Sep 11 09:20:50 2009 +0200 Committer: Fabio M. Di Nitto CommitterDate: Fri Sep 11 09:20:50 2009 +0200 config validation: clean up last bits allow load and no load tests for XML config files. sort a few options into Advanced and kill Debugging options. Signed-off-by: Fabio M. Di Nitto --- config/tools/xml/ccs_config_validate.in | 38 +++++++++++++++--------------- 1 files changed, 19 insertions(+), 19 deletions(-) diff --git a/config/tools/xml/ccs_config_validate.in b/config/tools/xml/ccs_config_validate.in index 9ac98f7..af2d186 100644 --- a/config/tools/xml/ccs_config_validate.in +++ b/config/tools/xml/ccs_config_validate.in @@ -25,14 +25,13 @@ print_usage() { echo " -V Print program version information, then exit" echo " -v Produce verbose output" echo "" - echo " -r Force validation of runtime config" - echo " -C config_loader Override config plugin loader" - echo "" echo "Validating XML configuraton files:" echo " -f configfile Validate an alternate config file" - echo " -l Do not perform load test (requires -f)" + echo " -l configfile Validate an alternate config file (load test)" echo "" - echo "Debugging options:" + echo "Advanced options:" + echo " -r Force validation of runtime config" + echo " -C config_loader Override config plugin loader" echo " -t tempfile Force temporay file to tempfile" echo " -n Do not remove temporary file" echo " -o Overwrite temporary file (dangerous)" @@ -70,19 +69,29 @@ check_opts() { exit 255 fi ;; - -f) + -l) shift COROSYNC_CLUSTER_CONFIG_FILE=$1 COROSYNC_DEFAULT_CONFIG_IFACE=xmlconfig:cmanpreconfig filetest=1 if [ -n "$loaderoverride" ] || \ - [ -n "$runtimetest" ]; then - echo "Error: invalid options. -f can not be set together with -r or -C" >&2 + [ -n "$runtimetest" ] || \ + [ -n "$noloadtest" ]; then + echo "Error: invalid options. -l can not be set together with -r or -C or -f" >&2 exit 255 fi ;; - -l) + -f) + shift + COROSYNC_CLUSTER_CONFIG_FILE=$1 + unset COROSYNC_DEFAULT_CONFIG_IFACE noloadtest=1 + if [ -n "$loaderoverride" ] || \ + [ -n "$runtimetest" ] || \ + [ -n "$filetest" ]; then + echo "Error: invalid options. -f can not be set together with -r or -C or -l" >&2 + exit 255 + fi ;; -r) unset COROSYNC_DEFAULT_CONFIG_IFACE @@ -100,12 +109,6 @@ check_opts() { esac shift done - - if [ -n "$noloadtest" ] && [ -z "$COROSYNC_CLUSTER_CONFIG_FILE" ]; then - echo "Error: -l requires -f option" >&2 - exit 255 - fi - } lecho() @@ -114,10 +117,7 @@ lecho() return 0 } -export COROSYNC_DEFAULT_CONFIG_IFACE -export COROSYNC_CLUSTER_CONFIG_FILE - -opts=$(getopt t:hVnC:f:lrov $@) +opts=$(getopt t:hVnC:f:l:rov $@) if [ "$?" != 0 ]; then print_usage >&2 exit 255