From cf379370addba64f090387eed27f8b91ae82e875 Mon Sep 17 00:00:00 2001 From: Alex Yang Date: Wed, 16 Aug 2017 16:16:44 +0800 Subject: Fix an error in sed statement JIRA: DAISY-42 Change-Id: I0fd709bb0dbee42cdc73076773cb635be6ba02cd Signed-off-by: Alex Yang --- ci/deploy/deploy.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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} -- cgit 1.2.3-korg