From c0f32f78e3059c9a0a9264e37f15a6e39d425c74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timoth=C3=A9e=20Floure?= Date: Mon, 6 Jul 2020 10:43:27 +0200 Subject: [PATCH] CentOS/luks: disable SSH/user+password ONE scripts --- opennebula-images/centos7-build-luks-opennebula-image.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/opennebula-images/centos7-build-luks-opennebula-image.sh b/opennebula-images/centos7-build-luks-opennebula-image.sh index 6bc6eca..6ea75e9 100755 --- a/opennebula-images/centos7-build-luks-opennebula-image.sh +++ b/opennebula-images/centos7-build-luks-opennebula-image.sh @@ -19,6 +19,7 @@ LOOPBACK_DEVICE=/dev/loop0 LUKS_PASSPHRASE=secret LUKS_DEVICE_NAME=cryptroot LUKS_DEVICE="/dev/mapper/$LUKS_DEVICE_NAME" +DISABLED_ONE_SCRIPTS="loc-20-set-username-password loc-22-ssh_public_key" ONE_CONTEXT_RPM_URL="https://github.com/OpenNebula/addon-context-linux/releases/download/v5.10.0/one-context-5.10.0-1.el$RELEASE.noarch.rpm" ONE_CONTEXT_RPM_PATH=/root/one-context.rpm @@ -113,6 +114,9 @@ EOF curl -L "$ONE_CONTEXT_RPM_URL" > "/mnt$ONE_CONTEXT_RPM_PATH" run_root dnf -y install "$ONE_CONTEXT_RPM_PATH" run_root rm "$ONE_CONTEXT_RPM_PATH" +for script in "$DISABLED_ONE_SCRIPTS"; do + run_root rm "/etc/one-context.d/$script" +done # Install resize2fs, which is required to resize the root file-system. run_root dnf -y install e2fsprogs