Skip to content

Commit 3b1a5b5

Browse files
committed
Introduce ADDITIONAL_PACKAGE variable
This variable will capture all the packages which is need to be installed as part of additional to what default image have. This is useful for next commits where we just add the cloud-init to this variable.
1 parent a1fe2a5 commit 3b1a5b5

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

createdisk-library.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -178,13 +178,13 @@ function install_additional_packages() {
178178
shift
179179
if [[ ${BASE_OS} = "fedora-coreos" ]]; then
180180
${SSH} core@${vm_ip} -- 'sudo sed -i -z s/enabled=0/enabled=1/g /etc/yum.repos.d/centos.repo'
181-
${SSH} core@${vm_ip} -- "sudo rpm-ostree install --allow-inactive $*"
181+
${SSH} core@${vm_ip} -- "sudo rpm-ostree install --allow-inactive $ADDITIONAL_PACKAGES"
182182
${SSH} core@${vm_ip} -- 'sudo sed -i -z s/enabled=1/enabled=0/g /etc/yum.repos.d/centos.repo'
183183
else
184184
# Download the hyperV daemons dependency on host
185185
local pkgDir=$(mktemp -d tmp-rpmXXX)
186186
mkdir -p ${pkgDir}/packages
187-
sudo yum download --downloadonly --downloaddir ${pkgDir}/packages $* --resolve --alldeps
187+
sudo yum download --downloadonly --downloaddir ${pkgDir}/packages ${ADDITIONAL_PACKAGES} --resolve --alldeps
188188

189189
# SCP the downloaded rpms to VM
190190
${SCP} -r ${pkgDir}/packages core@${vm_ip}:/home/core/
@@ -203,7 +203,7 @@ function install_additional_packages() {
203203
function prepare_hyperV() {
204204
local vm_ip=$1
205205

206-
install_additional_packages ${vm_ip} hyperv-daemons
206+
ADDITIONAL_PACKAGES+=" hyperv-daemons"
207207

208208
# Adding Hyper-V vsock support
209209
${SSH} core@${vm_ip} 'sudo bash -x -s' <<EOF

createdisk.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ INSTALL_DIR=${1:-crc-tmp-install-data}
1616
OPENSHIFT_VERSION=$(${JQ} -r .clusterInfo.openshiftVersion $INSTALL_DIR/crc-bundle-info.json)
1717
BASE_DOMAIN=$(${JQ} -r .clusterInfo.baseDomain $INSTALL_DIR/crc-bundle-info.json)
1818
BUNDLE_TYPE=$(${JQ} -r .type $INSTALL_DIR/crc-bundle-info.json)
19+
ADDITIONAL_PACKAGES=""
1920

2021
case ${BUNDLE_TYPE} in
2122
microshift)

0 commit comments

Comments
 (0)