Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 700255 Details for
Bug 516296
unattended install of satellite proxy cmd line version
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Bug-516296-unattended-install-of-satellite-proxy-cmd
0002-Bug-516296-unattended-install-of-satellite-proxy-cmd.patch (text/plain), 4.74 KB, created by
Dimitar Yordanov
on 2013-02-20 21:55:05 UTC
(
hide
)
Description:
Bug-516296-unattended-install-of-satellite-proxy-cmd
Filename:
MIME Type:
Creator:
Dimitar Yordanov
Created:
2013-02-20 21:55:05 UTC
Size:
4.74 KB
patch
obsolete
>From d203364e38e02d405bd77e1f7f3c6087427a06a3 Mon Sep 17 00:00:00 2001 >From: Dimitar Yordanov <dyordano@redhat.com> >Date: Wed, 20 Feb 2013 22:45:48 +0100 >Subject: [PATCH 2/2] Bug 516296 - unattended install of satellite proxy cmd > line version + Bug 896125 - configure-proxy.sh does not > handle appropriately wrong options > >--- > proxy/installer/configure-proxy.sh | 48 ++++++++++++++++++++++++++++++------ > 1 files changed, 40 insertions(+), 8 deletions(-) > >diff --git a/proxy/installer/configure-proxy.sh b/proxy/installer/configure-proxy.sh >index 735af26..10ebb5d 100755 >--- a/proxy/installer/configure-proxy.sh >+++ b/proxy/installer/configure-proxy.sh >@@ -73,6 +73,10 @@ options: > 1 if Spacewalk Proxy Server should communicate with parent over SSL. > 0 otherwise. Even if disabled, client can still use SSL to connect > to Spacewalk Proxy Server. >+ --rhn-user=RHN_USER >+ Red Hat Network or RHN Satellite user acount. >+ --rhn-password=RHN_PASSWORD >+ Red Hat Network or RHN Satellite password. > --version=VERSION > Version of Spacewalk Proxy Server you want to activate. > HELP >@@ -110,7 +114,7 @@ PARAMS=$( getopt -n$0 -u -a --longoptions="help answer-file: non-interactive \ > ssl-country: ssl-email: ssl-password: \ > ssl-cname: install-monitoring: enable-scout: \ > monitoring-parent: monitoring-parent-ip: populate-config-channel: \ >- start-services:" "h" "$@" ) >+ start-services: rhn-user: rhn-password:" "h" "$@" ) > > > [[ $? -ne 0 ]] && print_help || set -- ${PARAMS} >@@ -146,6 +150,8 @@ while [ $# -gt 0 ]; do > --monitoring-parent-ip) set_value MONITORING_PARENT_IP ${2} ${1};shift;; > --populate-config-channel) set_value POPULATE_CONFIG_CHANNEL ${2} ${1};shift;; > --start-services) set_value START_SERVICES ${2} ${1};shift;; >+ --rhn-user) set_value RHN_USER ${2} ${1};shift;; >+ --rhn-password) set_value RHN_PASSWORD ${2} ${1};shift;; > --) shift; > [[ $# -gt 0 ]] && echo "Error: Extra string(s) was/were found: $@" && exit 1 > break;; >@@ -155,6 +161,11 @@ while [ $# -gt 0 ]; do > shift > done > >+# params dep check >+if [[ ${INTERACTIVE} -eq 0 && ( -z ${POPULATE_CONFIG_CHANNEL} || ${POPULATE_CONFIG_CHANNEL} == "1" || ${POPULATE_CONFIG_CHANNEL} == "Y" || ${POPULATE_CONFIG_CHANNEL} == "y" ) ]];then >+ [[ -z ${RHN_USER} || -z ${RHN_PASSWORD} ]] && echo "Error: When --populate-config-channel is set to Yes both --rhn-user and --rhn-password have to be provided." && exit 1 >+fi >+ > default_or_input () { > local MSG="$1" > local VARIABLE="$2" >@@ -555,14 +566,35 @@ 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_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" >+ >+ if [[ ${INTERACTIVE} -eq 0 ]];then >+ >+ # remove the session key if any >+ rm -f ~/.rhncfg-manager-session >+ >+ # modify /etc/sysconfig/rhn/rhncfg-manager.conf, less problems >+ if [[ -e /etc/sysconfig/rhn/rhncfg-manager.conf ]];then >+ perl -i.bak -pe "s|[# ]*(username[ ]*=[ ]*)(.*)|\$1${RHN_USER}|; " /etc/sysconfig/rhn/rhncfg-manager.conf >+ else >+ echo "Error: File /etc/sysconfig/rhn/rhncfg-manager.conf is part of rhncfg-management and must exist." >+ exit 1 >+ fi >+ >+ # Create session >+ expect -c "spawn rhncfg-manager list-channels;match_max 100000;expect \"*?assword:*\";send -- \"${RHN_PASSWORD}\r\";send -- \"\r\";expect eof;" >+ >+ else >+ >+ 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 > fi >+ > rhncfg-manager update --server-name "$RHN_PARENT" \ > --channel="$CHANNEL_LABEL" \ > $HTTPDCONFD_DIR/ssl.conf \ >-- >1.7.7.6 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 516296
:
700253
| 700255