Skip to content

Commit

Permalink
Merge pull request #40 from honza/kernel-args-dhcp
Browse files Browse the repository at this point in the history
Bug 1946079: Modify dhcp kernel args based on ipv4/ipv6
  • Loading branch information
openshift-merge-robot committed Jun 12, 2021
2 parents 2f2aaa1 + 6ebc302 commit 40cadf4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Dockerfile.ocp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM registry.ci.openshift.org/ocp/builder:rhel-8-base-openshift-4.8

RUN dnf upgrade -y \
&& dnf install -y qemu-img jq xz \
&& dnf install -y qemu-img jq xz libguestfs-tools \
&& dnf clean all \
&& rm -rf /var/cache/{yum,dnf}/*

Expand Down
6 changes: 6 additions & 0 deletions get-resource.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ export http_proxy=${http_proxy:-$HTTP_PROXY}
export https_proxy=${https_proxy:-$HTTPS_PROXY}
export no_proxy=${no_proxy:-$NO_PROXY}
export CURL_CA_BUNDLE=${CURL_CA_BUNDLE:-/etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem}
export IP_OPTIONS=${IP_OPTIONS:-}

# Which image should we use
export RHCOS_IMAGE_URL=${1:-$RHCOS_IMAGE_URL}
Expand Down Expand Up @@ -64,6 +65,11 @@ else
unxz "$RHCOS_IMAGE_FILENAME_RAW"
fi

if [ -n "$IP_OPTIONS" ] ; then
BOOT_DISK=$(LIBGUESTFS_BACKEND=direct virt-filesystems -a "$RHCOS_IMAGE_FILENAME_QCOW" -l | grep boot | cut -f1 -d" ")
LIBGUESTFS_BACKEND=direct virt-edit -a "$RHCOS_IMAGE_FILENAME_QCOW" -m "$BOOT_DISK" /boot/loader/entries/ostree-1-rhcos.conf -e "s/^options/options ${IP_OPTIONS}/"
fi

qemu-img convert -O qcow2 -c "$RHCOS_IMAGE_FILENAME_QCOW" "$RHCOS_IMAGE_FILENAME_CACHED"
md5sum "$RHCOS_IMAGE_FILENAME_CACHED" | cut -f 1 -d " " > "$RHCOS_IMAGE_FILENAME_CACHED.md5sum"
fi
Expand Down

0 comments on commit 40cadf4

Please sign in to comment.