From 9074f5f1fcf40f04431e2826206a064178625824 Mon Sep 17 00:00:00 2001 From: Moshe Levi Date: Mon, 7 Mar 2016 10:12:13 +0200 Subject: [PATCH] Add lshw package to ironic-agent This patch add the lshw utils to allow the agent to retrive the vendor name. It also keeps the /usr/share/misc/pci.ids file for Ubuntu distro. Change-Id: I2828a7e585449f63887ad5a2e338b4e043d68e63 --- elements/ironic-agent/cleanup.d/99-ramdisk-create | 6 +++++- elements/ironic-agent/package-installs.yaml | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/elements/ironic-agent/cleanup.d/99-ramdisk-create b/elements/ironic-agent/cleanup.d/99-ramdisk-create index e4a9361eb..9a185da17 100755 --- a/elements/ironic-agent/cleanup.d/99-ramdisk-create +++ b/elements/ironic-agent/cleanup.d/99-ramdisk-create @@ -21,6 +21,10 @@ sudo ln -s ./sbin/init ./ # Remove python object files, they're not particularly useful for a ramdisk sudo find ./usr -name "*.pyc" -or -name "*.pyo" -delete +# Note: The pci.ids, which is used by lshw, locate on Ubuntu +# in /usr/share/misc. Therefore we are removing only the +# ./usr/share/misc/m* (will remove the magic and magic.mgc files). +# on RHEL pci.ids is locate on /usr/share/hwdata/pci.ids. sudo find . -xdev \ -path './sys/*' -prune -o \ -path './tmp/*' -prune -o \ @@ -31,7 +35,7 @@ sudo find . -xdev \ -path './usr/share/man/*' -prune -o \ -path './usr/share/info/*' -prune -o \ -path './usr/share/licenses/*' -prune -o \ - -path './usr/share/misc/*' -prune -o \ + -path './usr/share/misc/m*' -prune -o \ -print | sudo cpio -o -H newc | gzip > ${IMAGE_PATH}.initramfs select_boot_kernel_initrd $TARGET_ROOT diff --git a/elements/ironic-agent/package-installs.yaml b/elements/ironic-agent/package-installs.yaml index 0c1f74299..98e88105a 100644 --- a/elements/ironic-agent/package-installs.yaml +++ b/elements/ironic-agent/package-installs.yaml @@ -11,3 +11,4 @@ util-linux: genisoimage: gdisk: kmod: +lshw: