From f42cb641bf710d805ec3fffe4c10d69367b9f998 Mon Sep 17 00:00:00 2001 From: Robert Collins Date: Fri, 15 Feb 2013 15:34:09 +1300 Subject: [PATCH] Fedora needs to depend on dib-run-parts too. Change-Id: I56611d1c2bf13c8d24a87869bf8334d8e4992f6f --- elements/base/pre-install.d/02-baseline-tools | 3 ++- elements/fedora/element-deps | 1 + .../fedora/pre-install.d/15-fedora-fixup-grub-cfg | 13 +++++++++++++ 3 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 elements/fedora/element-deps create mode 100755 elements/fedora/pre-install.d/15-fedora-fixup-grub-cfg diff --git a/elements/base/pre-install.d/02-baseline-tools b/elements/base/pre-install.d/02-baseline-tools index 401d6042a..9119e7a84 100755 --- a/elements/base/pre-install.d/02-baseline-tools +++ b/elements/base/pre-install.d/02-baseline-tools @@ -3,7 +3,8 @@ set -e -DISTRO=`lsb_release -si` +# If lsb_release is missing, just do nothing. +DISTRO=`lsb_release -si` || true case $DISTRO in 'Ubuntu'|'Debian') diff --git a/elements/fedora/element-deps b/elements/fedora/element-deps new file mode 100644 index 000000000..64b9ac34f --- /dev/null +++ b/elements/fedora/element-deps @@ -0,0 +1 @@ +dib-run-parts diff --git a/elements/fedora/pre-install.d/15-fedora-fixup-grub-cfg b/elements/fedora/pre-install.d/15-fedora-fixup-grub-cfg new file mode 100755 index 000000000..c832d23ec --- /dev/null +++ b/elements/fedora/pre-install.d/15-fedora-fixup-grub-cfg @@ -0,0 +1,13 @@ +#!/bin/bash + +set -e + +GRUB_CFG=/boot/grub2/grub.cfg + +[ -f "$GRUB_CFG" ] + +# Update the config to have the search UUID of the image being built. +# When partition staging is moved to a separate stage, this will need to happen +# there. This generates a non-UUID config, which is irrelevant for booting with +# hypervisor kernel + ramdisk, and fixed up by 51-grub for vm images. +GRUB_DISABLE_LINUX_UUID=true grub2-mkconfig -o $GRUB_CFG