Description of problem: In case some of the parameters are wrong configure-proxy.sh just inform the user about this fact but does not exit itself. Version-Release number of selected component (if applicable): spacewalk-proxy-installer-1.7.6-4 How reproducible: 100 % Steps to Reproduce: 1. Register EL x86_64 system to Satellite or Hosted 2. Add Tools channel to the system 3. yum -y install spacewalk-proxy-installer 4. configure-proxy.sh --some-bad-option Actual results: #configure-proxy.sh --some-bad-option Error: Invalid option --some-bad-option RHN Parent [ibm-hs22-01.rhts.eng.brq.redhat.com]: CA Chain [/usr/share/rhn/RHN-ORG-TRUSTED-SSL-CERT]: Expected results: #configure-proxy.sh --some-bad-option Error: Invalid option --some-bad-option You may want to try: /usr/sbin/configure-proxy.sh --help Additional info: Code base related : (with possible fix that is commented out and which output is in "Expected results") while [ $# -ge 1 ]; do case $1 in --help | -h) print_help;; --answer-file=*) parse_answer_file $1;; --non-interactive) INTERACTIVE=0;; --version=*) VERSION=$(echo $1 | cut -d= -f2-);; ... --monitoring-parent=*) MONITORING_PARENT_IP=$(echo $1 | cut -d= -f2-);; --monitoring-parent-ip=*) MONITORING_PARENT_IP=$(echo $1 | cut -d= -f2-);; --populate-config-channel=*) POPULATE_CONFIG_CHANNEL=$(echo $1 | cut -d= -f2-);; --start-services=*) START_SERVICES=$(echo $1 | cut -d= -f2-);; *) echo Error: Invalid option $1 # FIX dyordano #echo You may want to try: $0 --help #exit esac shift done
Fixed in spacewalk master by commit 430faadbe5cd3ff7783782eeaaf117b1c7b61ae2 896125 - use standard option parser
Created attachment 693398 [details] Patch - bz896125
Fixed in spacewalk master by commit 265c47f05c1a82cc354908acb41cc40836a9453c 896125 - fixed configure-proxy.sh help commit 663e3053f0dec9f531b189b6eb2af0ebda06057d 896125 - make Y/N values optional commit f32c64d0e8cfec08dd47f2d127472828ad4c6ec2 896125 - report extra commandline arguments commit c7cf84c51d84a28f099bff21e52fa7b99ad98994 896125 - fail if answer file is not readable
I think there is one more issue that is not addressed. Please try: ./configure-proxy.sh --traceback-email --use-ssl
(In reply to comment #6) > ./configure-proxy.sh --traceback-email --use-ssl It's not a bug. This is how getopts works - --traceback-email needs argument so it takes '--use-ssl' as an argument. If you want to set an empty traceback email use ./configure-proxy.sh --traceback-email= --use-ssl
Issue from comment #6 fixed in commit 8c3d36cbe1f9b1bee9cfaa192652f6b87969552c 896125 - fixed missing arguments issue
Just one more thing: --monitoring-parent) set_value "$1" MONITORING_PARENT_IP "$2"; shift;; --monitoring-parent-ip) set_value "$1" MONITORING_PARENT_IP "$2"; shift;; I think it should be: --monitoring-parent) set_value "$1" MONITORING_PARENT "$2"; shift;;
Stage validated with spacewalk-proxy-installer-2.0.1-2.el6sat. a) > configure-proxy.sh RHN Parent [<fqdn>]: b) > configure-proxy.sh --wrong-option configure-proxy.sh: unrecognized option '--wrong-option' usage: configure-proxy.sh [options] c) > configure-proxy.sh --use-ssl --wrong-option configure-proxy.sh: unrecognized option '--wrong-option' usage: configure-proxy.sh [options] d) > configure-proxy.sh --answer-file=/tmp/aaaa Answer file '/tmp/aaaa' is not readable. e) > configure-proxy.sh --monitoring-parent-ip configure-proxy.sh: option '--monitoring-parent-ip' requires an argument usage: configure-proxy.sh [options]
Red Hat Satellite Proxy 5.6 has been released. This bug tracked under Proxy. This bug either was VERIFIED or RELEASE_PENDING (re-verified prior shortly before release). Moving to CLOSED CURRENT_RELEASE. Text from Upgrade Erratum follows: Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHEA-2013-1392.html