From bb8126e8871ae42f01e6cb371813d1f6ee386ba0 Mon Sep 17 00:00:00 2001 From: Ben Nemec Date: Wed, 22 Oct 2014 15:13:48 -0500 Subject: [PATCH] Use binary-deps.d for dracut ramdisks Instead of hard-coding a list of binaries to include in the dracut ramdisk, use the existing binary-deps.d functionality to provide a list. This will allow other ramdisks (such as discovery) to add the binaries they need. Change-Id: Ib7ffa15e08db1cc45e93a8f2a5c01369772c93ff --- .../dracut-ramdisk/binary-deps.d/dracut-ramdisk | 15 +++++++++++++++ .../post-install.d/99-build-dracut-ramdisk | 2 +- .../post-install.d/01-ensure-binaries | 0 3 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 elements/dracut-ramdisk/binary-deps.d/dracut-ramdisk rename elements/{ramdisk => ramdisk-base}/post-install.d/01-ensure-binaries (100%) diff --git a/elements/dracut-ramdisk/binary-deps.d/dracut-ramdisk b/elements/dracut-ramdisk/binary-deps.d/dracut-ramdisk new file mode 100644 index 00000000..ecab2d65 --- /dev/null +++ b/elements/dracut-ramdisk/binary-deps.d/dracut-ramdisk @@ -0,0 +1,15 @@ +tail +head +awk +ifconfig +cut +expr +route +ping +tgtd +tgtadm +nc +wget +curl +tftp +grep diff --git a/elements/dracut-ramdisk/post-install.d/99-build-dracut-ramdisk b/elements/dracut-ramdisk/post-install.d/99-build-dracut-ramdisk index 0c5e3fca..0daf9b38 100755 --- a/elements/dracut-ramdisk/post-install.d/99-build-dracut-ramdisk +++ b/elements/dracut-ramdisk/post-install.d/99-build-dracut-ramdisk @@ -51,7 +51,7 @@ cp "$TMP_MOUNT_PATH/init" "$MODULE_PATH/80deploy-ramdisk/init.sh" # -o: Force omission of these dracut modules. Our scripts are written for bash, # so dash is not desirable, and plymouth was causing some issues on Ubuntu. dracut -N \ - --install 'tail head awk ifconfig cut expr route ping tgtd tgtadm nc wget curl tftp grep' \ + --install "$(cat /etc/dib_binary_deps)" \ --kernel-cmdline "rd.shell rd.debug rd.neednet=1 rd.driver.pre=ahci" \ --include "$TMP_MOUNT_PATH/init-func" /init-func \ --kver "${KERNEL_VERSION}" \ diff --git a/elements/ramdisk/post-install.d/01-ensure-binaries b/elements/ramdisk-base/post-install.d/01-ensure-binaries similarity index 100% rename from elements/ramdisk/post-install.d/01-ensure-binaries rename to elements/ramdisk-base/post-install.d/01-ensure-binaries