From a1c0fc5623b1e844c72c37181874a5d5ce8626e7 Mon Sep 17 00:00:00 2001 From: David Galloway Date: Wed, 27 Apr 2016 17:00:00 -0400 Subject: [PATCH] cobbler: Only set bootdev in kickstart if installing Xenial. "bootdev string default" is only supported in Xenial. Signed-off-by: David Galloway --- .../templates/kickstarts/cephlab_ubuntu.preseed | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/roles/cobbler/templates/kickstarts/cephlab_ubuntu.preseed b/roles/cobbler/templates/kickstarts/cephlab_ubuntu.preseed index 5cd0ff0d..abcf51a5 100644 --- a/roles/cobbler/templates/kickstarts/cephlab_ubuntu.preseed +++ b/roles/cobbler/templates/kickstarts/cephlab_ubuntu.preseed @@ -3,6 +3,12 @@ # Fetch the os_version from the distro using this profile. #set os_version = $getVar('os_version','') +# Fetch Ubuntu version (e.g., 14.04) +#set distro_ver = $getVar('distro','').split("-")[1] + +# Fetch Ubuntu major version (e.g., 14) +#set distro_ver_major = $distro_ver.split(".")[0] + ### Apt setup # You can choose to install non-free and contrib software. #d-i apt-setup/non-free boolean true @@ -109,8 +115,8 @@ d-i pkgsel/upgrade select safe-upgrade # "landscape" (manage system with Landscape). d-i pkgsel/update-policy select none -# Install GRUB to default location. Required as of Xenial. -#if $os_version == 'xenial' +# Set GRUB bootdev to 'default' if Xenial or later +#if int($distro_ver_major) >= 16 d-i grub-installer/bootdev string default #end if -- 2.47.3