From: Alex Yang Date: Wed, 16 Aug 2017 08:16:44 +0000 (+0800) Subject: Fix an error in sed statement X-Git-Tag: opnfv-5.0.RC1~36 X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=commitdiff_plain;h=cf379370addba64f090387eed27f8b91ae82e875;p=daisy.git Fix an error in sed statement JIRA: DAISY-42 Change-Id: I0fd709bb0dbee42cdc73076773cb635be6ba02cd Signed-off-by: Alex Yang --- diff --git a/ci/deploy/deploy.sh b/ci/deploy/deploy.sh index 9360da85..2b6843c6 100755 --- a/ci/deploy/deploy.sh +++ b/ci/deploy/deploy.sh @@ -190,10 +190,11 @@ function update_dha_by_pdf() fi if [ -z $(awk "BEGIN{}(/daisy_ip/){print NR}" $tmpfile) ]; then line=$(awk "BEGIN{}(/daisy_gateway/){print NR}" $tmpfile) - sed -i "${line}b\daisy_ip: $INSTALLER_IP" $tmpfile + sed -i "${line} i\daisy_ip: $INSTALLER_IP" $tmpfile fi if [ $? -ne 0 ]; then echo "Cannot write INSTALLER_IP to config file, use original deploy.yml !" + rm $tmpfile return fi cp ${tmpfile} ${DHA_CONF}