Skip to content

Commit

Permalink
Ramdisk arch should not be hardcoded
Browse files Browse the repository at this point in the history
Hardcoding is bad, don't do it kids.
  • Loading branch information
elfosardo authored and derekhiggins committed Feb 18, 2020
1 parent f4189af commit 2cefcd6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions build-ipa.sh
Expand Up @@ -3,11 +3,12 @@ set -ex

TMPDIR=$(mktemp -d -p /var/tmp)
TMPDIR_RAMDISK=$(mktemp -d -p /var/tmp)
IPA_RAMDISK_VERSION=$(rpm -q --queryformat "%{VERSION}-%{RELEASE}" rhosp-director-images-ipa-x86_64)
IPA_RAMDISK_ARCH=$(uname -m)
IPA_RAMDISK_VERSION=$(rpm -q --queryformat "%{VERSION}-%{RELEASE}" rhosp-director-images-ipa-${IPA_RAMDISK_ARCH})

chmod 755 $TMPDIR $TMPDIR_RAMDISK
cd $TMPDIR
tar -xf /usr/share/rhosp-director-images/ironic-python-agent-${IPA_RAMDISK_VERSION}.$(uname -m).tar
tar -xf /usr/share/rhosp-director-images/ironic-python-agent-${IPA_RAMDISK_VERSION}.${IPA_RAMDISK_ARCH}.tar
cd $TMPDIR_RAMDISK
/usr/lib/dracut/skipcpio $TMPDIR/ironic-python-agent.initramfs | zcat | cpio -ivd
# NOTE(elfosardo) we could inject a list of packages that we want to add, based
Expand Down

0 comments on commit 2cefcd6

Please sign in to comment.