From 2211755bf701f74470053bc3a24a5368454986fc Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Sat, 16 May 2020 10:14:23 -0400 Subject: [PATCH] Have SUSE profile work for LEAP and SLE Add a directive to comment out the superfluous autoyast content from SLE when dealing with the more straightforward LEAP. --- confluent_osdeploy/suse15/profiles/hpc/autoyast | 4 ++++ confluent_osdeploy/suse15/profiles/hpc/initprofile.sh | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/confluent_osdeploy/suse15/profiles/hpc/autoyast b/confluent_osdeploy/suse15/profiles/hpc/autoyast index fe43a14f..03a9c478 100644 --- a/confluent_osdeploy/suse15/profiles/hpc/autoyast +++ b/confluent_osdeploy/suse15/profiles/hpc/autoyast @@ -11,6 +11,7 @@ false + %%IFSLE%% sle-module-basesystem/Module-Basesystem @@ -21,10 +22,13 @@ Legacy-Module/Module-Legacy + %%ENDIFSLE%% + %%IFSLE%% SLE_HPC + %%ENDIFSLE%% base diff --git a/confluent_osdeploy/suse15/profiles/hpc/initprofile.sh b/confluent_osdeploy/suse15/profiles/hpc/initprofile.sh index b4cd704a..5169c88c 100644 --- a/confluent_osdeploy/suse15/profiles/hpc/initprofile.sh +++ b/confluent_osdeploy/suse15/profiles/hpc/initprofile.sh @@ -12,3 +12,9 @@ ln -s $1/boot/x86_64/loader/linux $2/boot/kernel && \ ln -s $1/boot/x86_64/loader/initrd $2/boot/initramfs/distribution && \ mkdir -p $2/boot/efi/boot && \ ln -s $1/EFI/BOOT/bootx64.efi $1/EFI/BOOT/grub.efi $2/boot/efi/boot/ +profile=$(basename $2) +if [[ $profile =~ ^sle.* ]]; then + sed -i 's/%%IFSLE%%//;s/%%ENDIFSLE%%//' $2/autoyast +else + sed -i 's/%%IFSLE%%//' $2/autoyast +fi