proxy/installer/configure-proxy.sh | 73 +++++++++++++++++++------------------
1 file changed, 39 insertions(+), 34 deletions(-)
New commits:
commit e92367c01a61d5c9990f0cea73850972a4df189e
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Thu Jul 26 16:30:13 2012 +0200
make sure username/password is correct
diff --git a/proxy/installer/configure-proxy.sh b/proxy/installer/configure-proxy.sh
index 1f916b1..4ce948d 100755
--- a/proxy/installer/configure-proxy.sh
+++ b/proxy/installer/configure-proxy.sh
@@ -526,8 +526,14 @@ CHANNEL_LABEL="rhn_proxy_config_$SYSTEM_ID"
default_or_input "Create and populate configuration channel $CHANNEL_LABEL?"
POPULATE_CONFIG_CHANNEL 'Y/n'
POPULATE_CONFIG_CHANNEL=$(yes_no $POPULATE_CONFIG_CHANNEL)
if [ "$POPULATE_CONFIG_CHANNEL" = "1" ]; then
- rhncfg-manager create-channel --server-name "$RHN_PARENT" \
- "$CHANNEL_LABEL"
+ RHNCFG_STATUS=1
+ while [ $RHNCFG_STATUS != 0 ] ; do
+ CONFIG_CHANNELS=$(rhncfg-manager list-channels --server-name
"$RHN_PARENT")
+ RHNCFG_STATUS=$?
+ done
+ if ! grep -q -E "^ +$CHANNEL_LABEL$"
<<<"$CONFIG_CHANNELS" ; then
+ rhncfg-manager create-channel --server-name "$RHN_PARENT"
"$CHANNEL_LABEL"
+ fi
rhncfg-manager update --server-name "$RHN_PARENT" \
--channel="$CHANNEL_LABEL" \
$HTTPDCONFD_DIR/ssl.conf \
commit 22471047ce9d33843d0e58f504ea42f437808659
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Thu Jul 26 15:39:37 2012 +0200
reuse already assigned variable
diff --git a/proxy/installer/configure-proxy.sh b/proxy/installer/configure-proxy.sh
index fca776d..1f916b1 100755
--- a/proxy/installer/configure-proxy.sh
+++ b/proxy/installer/configure-proxy.sh
@@ -527,9 +527,9 @@ default_or_input "Create and populate configuration channel
$CHANNEL_LABEL?" POP
POPULATE_CONFIG_CHANNEL=$(yes_no $POPULATE_CONFIG_CHANNEL)
if [ "$POPULATE_CONFIG_CHANNEL" = "1" ]; then
rhncfg-manager create-channel --server-name "$RHN_PARENT" \
- rhn_proxy_config_$SYSTEM_ID
+ "$CHANNEL_LABEL"
rhncfg-manager update --server-name "$RHN_PARENT" \
- --channel=rhn_proxy_config_$SYSTEM_ID \
+ --channel="$CHANNEL_LABEL" \
$HTTPDCONFD_DIR/ssl.conf \
$RHNCONF_DIR/rhn.conf \
$RHNCONF_DIR/cluster.ini \
commit d48e0d621183c92111a6dde2aa35f7bc09945762
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Thu Jul 26 14:40:13 2012 +0200
fixed indentation
diff --git a/proxy/installer/configure-proxy.sh b/proxy/installer/configure-proxy.sh
index 09870ae..fca776d 100755
--- a/proxy/installer/configure-proxy.sh
+++ b/proxy/installer/configure-proxy.sh
@@ -92,37 +92,36 @@ INTERACTIVE=1
CNAME_INDEX=0
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-);;
- --rhn-parent=*) RHN_PARENT=$(echo $1 | cut -d= -f2-);;
- --traceback-email=*) TRACEBACK_EMAIL=$(echo $1 | cut -d= -f2-);;
- --use-ssl=*) USE_SSL=$(echo $1 | cut -d= -f2-);;
- --ca-chain=*) CA_CHAIN=$(echo $1 | cut -d= -f2-);;
- --force-own-ca) FORCE_OWN_CA=1;;
- --http-proxy=*) HTTP_PROXY=$(echo $1 | cut -d= -f2-);;
- --http-username=*) HTTP_USERNAME=$(echo $1 | cut -d= -f2-);;
- --http-password=*) HTTP_PASSWORD=$(echo $1 | cut -d= -f2-);;
- --ssl-build-dir=*) SSL_BUILD_DIR=$(echo $1 | cut -d= -f2-);;
- --ssl-org=*) SSL_ORG=$(echo $1 | cut -d= -f2-);;
- --ssl-orgunit=*) SSL_ORGUNIT=$(echo $1 | cut -d= -f2-);;
- --ssl-common=*) SSL_COMMON=$(echo $1 | cut -d= -f2-);;
- --ssl-city=*) SSL_CITY=$(echo $1 | cut -d= -f2-);;
- --ssl-state=*) SSL_STATE=$(echo $1 | cut -d= -f2-);;
- --ssl-country=*) SSL_COUNTRY=$(echo $1 | cut -d= -f2-);;
- --ssl-email=*) SSL_EMAIL=$(echo $1 | cut -d= -f2-);;
- --ssl-password=*) SSL_PASSWORD=$(echo $1 | cut -d= -f2-);;
- --ssl-cname=*) SSL_CNAME_PARSED[CNAME_INDEX++]=--set-cname=$(echo $1 | cut
-d= -f2-);;
- --install-monitoring=*) INSTALL_MONITORING=$(echo $1 | cut -d= -f2-);;
- --enable-scout=*) ENABLE_SCOUT=$(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
+ case $1 in
+ --help | -h) print_help;;
+ --answer-file=*) parse_answer_file $1;;
+ --non-interactive) INTERACTIVE=0;;
+ --version=*) VERSION=$(echo $1 | cut -d= -f2-);;
+ --rhn-parent=*) RHN_PARENT=$(echo $1 | cut -d= -f2-);;
+ --traceback-email=*) TRACEBACK_EMAIL=$(echo $1 | cut -d= -f2-);;
+ --use-ssl=*) USE_SSL=$(echo $1 | cut -d= -f2-);;
+ --ca-chain=*) CA_CHAIN=$(echo $1 | cut -d= -f2-);;
+ --force-own-ca) FORCE_OWN_CA=1;;
+ --http-proxy=*) HTTP_PROXY=$(echo $1 | cut -d= -f2-);;
+ --http-username=*) HTTP_USERNAME=$(echo $1 | cut -d= -f2-);;
+ --http-password=*) HTTP_PASSWORD=$(echo $1 | cut -d= -f2-);;
+ --ssl-build-dir=*) SSL_BUILD_DIR=$(echo $1 | cut -d= -f2-);;
+ --ssl-org=*) SSL_ORG=$(echo $1 | cut -d= -f2-);;
+ --ssl-orgunit=*) SSL_ORGUNIT=$(echo $1 | cut -d= -f2-);;
+ --ssl-common=*) SSL_COMMON=$(echo $1 | cut -d= -f2-);;
+ --ssl-city=*) SSL_CITY=$(echo $1 | cut -d= -f2-);;
+ --ssl-state=*) SSL_STATE=$(echo $1 | cut -d= -f2-);;
+ --ssl-country=*) SSL_COUNTRY=$(echo $1 | cut -d= -f2-);;
+ --ssl-email=*) SSL_EMAIL=$(echo $1 | cut -d= -f2-);;
+ --ssl-password=*) SSL_PASSWORD=$(echo $1 | cut -d= -f2-);;
+ --ssl-cname=*) SSL_CNAME_PARSED[CNAME_INDEX++]=--set-cname=$(echo $1 | cut -d=
-f2-);;
+ --install-monitoring=*) INSTALL_MONITORING=$(echo $1 | cut -d= -f2-);;
+ --enable-scout=*) ENABLE_SCOUT=$(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
esac
shift
done
Show replies by date