public inbox for cluster-cvs@sourceware.org
help / color / mirror / Atom feed
* cluster: STABLE3 - config validation: clean up last bits
@ 2009-09-11 7:22 Fabio M. Di Nitto
0 siblings, 0 replies; only message in thread
From: Fabio M. Di Nitto @ 2009-09-11 7:22 UTC (permalink / raw)
To: cluster-cvs-relay
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=b25166629f95f0e3a4e0cd527fb17f25e8ca1699
Commit: b25166629f95f0e3a4e0cd527fb17f25e8ca1699
Parent: d4610c81e3550332b0a5b64d819b458d9e2e4eb4
Author: Fabio M. Di Nitto <fdinitto@redhat.com>
AuthorDate: Fri Sep 11 09:20:50 2009 +0200
Committer: Fabio M. Di Nitto <fdinitto@redhat.com>
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 <fdinitto@redhat.com>
---
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2009-09-11 7:22 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-09-11 7:22 cluster: STABLE3 - config validation: clean up last bits Fabio M. Di Nitto
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).