Skip to content

Commit

Permalink
Remove jq dependency
Browse files Browse the repository at this point in the history
Using sed + capturing groups we can retrieve the bundle from the json
too so we don't need to install jq at the node container.

Signed-off-by: Quique Llorente <ellorent@redhat.com>
  • Loading branch information
qinqon committed Jul 16, 2021
1 parent b526af5 commit 748e16b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion images/base/Dockerfile
Expand Up @@ -112,7 +112,6 @@ RUN echo "Installing Packages ..." \
libseccomp2 pigz \
bash ca-certificates curl rsync \
nfs-common fuse-overlayfs \
jq \
&& find /lib/systemd/system/sysinit.target.wants/ -name "systemd-tmpfiles-setup.service" -delete \
&& rm -f /lib/systemd/system/multi-user.target.wants/* \
&& rm -f /etc/systemd/system/*.wants/* \
Expand Down
2 changes: 1 addition & 1 deletion images/base/files/usr/local/bin/mount-product-files
Expand Up @@ -19,7 +19,7 @@ set -o errexit
set -o nounset
set -o pipefail

bundle=$(jq -r .bundle)
bundle=$(sed -r 's/.*,"bundle":"([/0-9a-z\.]*)",.*/\1/')
cp /kind/product_* "$bundle/rootfs/"
if [[ -f /sys/class/dmi/id/product_name ]]; then
mount -o ro,bind "$bundle/rootfs/product_name" "$bundle/rootfs/sys/class/dmi/id/product_name"
Expand Down

0 comments on commit 748e16b

Please sign in to comment.