[node-patches] Change in ovirt-node[master]: init: Split management_server if user used "addr:port"

fabiand at redhat.com fabiand at redhat.com
Thu Aug 14 13:14:23 UTC 2014


Fabian Deutsch has posted comments on this change.

Change subject: init: Split management_server if user used "addr:port"
......................................................................


Patch Set 1: Code-Review-1

(1 comment)

Basically nice, just a nit pick

http://gerrit.ovirt.org/#/c/31483/1/scripts/ovirt-init-functions.sh.in
File scripts/ovirt-init-functions.sh.in:

Line 887:         value=$(ptr $p)
Line 888:         if [ -n "$value" -o $p = 'init' -o $p = 'upgrade' -o $p = 'install' ]; then
Line 889:             log "Updating OVIRT_$PARAM to '$value'"
Line 890:             if [[ ${PARAM} == "MANAGEMENT_SERVER" && ${value} == *:* ]]; then
Line 891:                 MGMSERVER=`echo $value | cut -d \: -f 1`
You might want to use bash magic here:

    export ALL=123:456
    echo server ${ALL%:*}   # remove : and everything after it
    echo port ${ALL#*:}"   # remove : and everything before it
Line 892:                 MGMPORT=`echo $value | cut -d \: -f 2`
Line 893:                 echo "set /files$OVIRT_DEFAULTS/OVIRT_MANAGEMENT_SERVER '\"${MGMSERVER}\"'" \
Line 894:                     >> $tmpaug
Line 895:                 echo "set /files$OVIRT_DEFAULTS/OVIRT_MANAGEMENT_PORT '\"${MGMPORT}\"'" \


-- 
To view, visit http://gerrit.ovirt.org/31483
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I8b0d4055a8fd66c761a977d160422befc42019f9
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: Douglas Schilling Landgraf <dougsland at redhat.com>
Gerrit-Reviewer: Douglas Schilling Landgraf <dougsland at redhat.com>
Gerrit-Reviewer: Fabian Deutsch <fabiand at redhat.com>
Gerrit-Reviewer: Ryan Barry <rbarry at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-HasComments: Yes



More information about the node-patches mailing list