[iec] centos: Preinstall git into cloud image 52/68252/1
authorAlexandru Avadanii <Alexandru.Avadanii@enea.com>
Mon, 22 Jul 2019 13:10:24 +0000 (15:10 +0200)
committerAlexandru Avadanii <Alexandru.Avadanii@enea.com>
Mon, 22 Jul 2019 13:35:35 +0000 (15:35 +0200)
While at it, fix CentOS selinux preconfiguration on x86_64, which
was previously limited (incorrectly) to AArch64.

Change-Id: I2d6604d3eea2bfc11fdd5dd3aeb4e2c0c3ede4a2
Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
mcp/config/scenario/defaults.yaml.j2
mcp/scripts/lib_jump_deploy.sh

index 5dbf529..697a8f7 100644 (file)
@@ -73,6 +73,7 @@ x86_64:
         install:
           - salt-minion
           - epel-release
+          - git
     control:
       repo: ~
       pkg:
@@ -141,6 +142,7 @@ aarch64:
         install:
           - salt-minion
           - epel-release
+          - git
     control:
       repo: ~
       pkg:
index 40910f4..24fc4ee 100644 (file)
@@ -143,8 +143,6 @@ function __mount_image {
     sudo umount -l "${OPNFV_MNT_DIR}"
     # AArch64 CentOS cloud image has root partition at index 4 instead of 1
     sudo mount "${OPNFV_MAP_DEV/p1/p4}" "${OPNFV_MNT_DIR}"
-    sudo sed -i -e 's/^\(SELINUX\)=.*$/\1=permissive/g' \
-      "${OPNFV_MNT_DIR}/etc/selinux/config"
   else
     # grub-update does not like /dev/nbd*, so use a loop device to work around it
     sudo losetup "${OPNFV_LOOP_DEV}" "${OPNFV_MAP_DEV}"
@@ -170,6 +168,9 @@ function __mount_image {
     sudo chroot "${OPNFV_MNT_DIR}" apt --assume-yes purge nplan netplan.io
     echo "source /etc/network/interfaces.d/*" | \
       sudo tee "${OPNFV_MNT_DIR}/etc/network/interfaces"
+  elif [[ "${MCP_OS:-}" =~ centos ]]; then
+    sudo sed -i -e 's/^\(SELINUX\)=.*$/\1=permissive/g' \
+      "${OPNFV_MNT_DIR}/etc/selinux/config"
   fi
   sudo cp -f --remove-destination \
     /etc/resolv.conf "${OPNFV_MNT_DIR}/etc/resolv.conf"