Remove double quotes around EOF 53/70753/2
authorRihab Banday <rihab.banday@ericsson.com>
Wed, 12 Aug 2020 16:25:30 +0000 (18:25 +0200)
committerVictor Morales <v.morales@samsung.com>
Thu, 13 Aug 2020 19:46:06 +0000 (15:46 -0400)
The double quotes introduced by linting tool
around EOF in functions.sh causes issues during
deployment in CentOS. This change removes the double quotes.

Change-Id: I23f4739e9bfbde296c48d4cf260b8483a844fd0b
Signed-off-by: Rihab Banday <rihab.banday@ericsson.com>
functions.sh

index 5f7c0db..d3d027e 100755 (executable)
@@ -33,7 +33,8 @@ get_vm_ip() {
 
 # Setup PXE network
 setup_PXE_network() {
-    ssh -o StrictHostKeyChecking=no -tT "$USERNAME"@"$(get_vm_ip)" << "EOF"
+    # shellcheck disable=SC2087
+    ssh -o StrictHostKeyChecking=no -tT "$USERNAME"@"$(get_vm_ip)" << EOF
 sudo ifconfig $PXE_IF up
 sudo ifconfig $PXE_IF $PXE_IF_IP netmask $NETMASK
 sudo ifconfig $PXE_IF hw ether $PXE_IF_MAC
@@ -43,13 +44,14 @@ EOF
 # Copy files needed by Infra engine & BMRA in the jumphost VM
 copy_files_jump() {
     scp -r -o StrictHostKeyChecking=no \
-    "$CURRENTPATH/{hw_config/$VENDOR/,sw_config/$INSTALLER/}" \
+    "$CURRENTPATH"/{hw_config/"$VENDOR"/,sw_config/"$INSTALLER"/} \
     "$USERNAME@$(get_vm_ip):$PROJECT_ROOT"
 }
 
 # Host Provisioning
 provision_hosts() {
-    ssh -tT "$USERNAME"@"$(get_vm_ip)" << "EOF"
+    # shellcheck disable=SC2087
+    ssh -tT "$USERNAME"@"$(get_vm_ip)" << EOF
 # Install and run cloud-infra
 if [ ! -d "${PROJECT_ROOT}/engine" ]; then
     ssh-keygen -t rsa -N "" -f ${PROJECT_ROOT}/.ssh/id_rsa
@@ -69,7 +71,8 @@ EOF
 
 # Setup networking on provisioned hosts (Adapt setup_network.sh according to your network setup)
 setup_network() {
-    ssh -tT  "$USERNAME"@"$(get_vm_ip)" << "EOF"
+    # shellcheck disable=SC2087
+    ssh -tT  "$USERNAME"@"$(get_vm_ip)" << EOF
 ssh -o StrictHostKeyChecking=no root@$MASTER_IP \
     'bash -s' <  ${PROJECT_ROOT}/${VENDOR}/setup_network.sh
 ssh -o StrictHostKeyChecking=no root@$WORKER_IP \
@@ -79,7 +82,8 @@ EOF
 
 # k8s Provisioning (currently BMRA)
 provision_k8s() {
-    ssh -tT  "$USERNAME"@"$(get_vm_ip)" << "EOF"
+    # shellcheck disable=SC2087
+    ssh -tT  "$USERNAME"@"$(get_vm_ip)" << EOF
 # Install BMRA
 if [ ! -d "${PROJECT_ROOT}/container-experience-kits" ]; then
     curl -fsSL https://get.docker.com/ | sh