HC Test: hc2vpp bootstrap script fix 26/5426/2
authorselias <samelias@cisco.com>
Mon, 20 Feb 2017 09:49:01 +0000 (10:49 +0100)
committerselias <samelias@cisco.com>
Mon, 20 Feb 2017 09:54:19 +0000 (10:54 +0100)
Trying to scp both *.deb and *.rpm packages in one command will
not work if only one of them exists.

Change-Id: I9692efff309eb7eac64dd45873ee455fbbb48a86
Signed-off-by: selias <samelias@cisco.com>
bootstrap-hc2vpp-integration.sh
bootstrap-hc2vpp-verify.sh

index e8c0d5e..eec9eef 100755 (executable)
@@ -150,8 +150,13 @@ for index in "${!VIRL_SERVER[@]}"; do
     if [ "${copy}" -eq "0" ]; then
         echo "files have already been copied to the VIRL host ${VIRL_SERVER[${index}]}"
     else
-        scp ${SSH_OPTIONS} *.deb *.rpm \
-        ${VIRL_USERNAME}@${VIRL_SERVER[${index}]}:${VIRL_DIR_LOC}/
+        if [ "${OS}" == "centos7" ]; then
+            scp ${SSH_OPTIONS} *.rpm \
+                ${VIRL_USERNAME}@${VIRL_SERVER[${index}]}:${VIRL_DIR_LOC}/
+        else
+            scp ${SSH_OPTIONS} *.deb \
+                ${VIRL_USERNAME}@${VIRL_SERVER[${index}]}:${VIRL_DIR_LOC}/
+        fi
          result=$?
         if [ "${result}" -ne "0" ]; then
             echo "Failed to copy files to VIRL host ${VIRL_SERVER[${index}]}"
index af21842..40e6e4a 100755 (executable)
@@ -146,8 +146,13 @@ for index in "${!VIRL_SERVER[@]}"; do
     if [ "${copy}" -eq "0" ]; then
         echo "files have already been copied to the VIRL host ${VIRL_SERVER[${index}]}"
     else
-        scp ${SSH_OPTIONS} *.deb *.rpm \
-        ${VIRL_USERNAME}@${VIRL_SERVER[${index}]}:${VIRL_DIR_LOC}/
+        if [ "${OS}" == "centos7" ]; then
+            scp ${SSH_OPTIONS} *.rpm \
+                ${VIRL_USERNAME}@${VIRL_SERVER[${index}]}:${VIRL_DIR_LOC}/
+        else
+            scp ${SSH_OPTIONS} *.deb \
+                ${VIRL_USERNAME}@${VIRL_SERVER[${index}]}:${VIRL_DIR_LOC}/
+        fi
          result=$?
         if [ "${result}" -ne "0" ]; then
             echo "Failed to copy files to VIRL host ${VIRL_SERVER[${index}]}"

©2016 FD.io a Linux Foundation Collaborative Project. All Rights Reserved.
Linux Foundation is a registered trademark of The Linux Foundation. Linux is a registered trademark of Linus Torvalds.
Please see our privacy policy and terms of use.