summaryrefslogtreecommitdiffstats
path: root/ci
diff options
context:
space:
mode:
authorAlex Yang <yangyang1@zte.com.cn>2017-08-16 16:16:44 +0800
committerAlex Yang <yangyang1@zte.com.cn>2017-08-16 16:16:44 +0800
commitcf379370addba64f090387eed27f8b91ae82e875 (patch)
treea1257f4de986e25b266904f527b255c3f0a1338c /ci
parent98f1d062cad5b2d89945b24f616f1c769a0a1cec (diff)
Fix an error in sed statement
JIRA: DAISY-42 Change-Id: I0fd709bb0dbee42cdc73076773cb635be6ba02cd Signed-off-by: Alex Yang <yangyang1@zte.com.cn>
Diffstat (limited to 'ci')
-rwxr-xr-xci/deploy/deploy.sh3
1 files changed, 2 insertions, 1 deletions
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}