From e565a1752f1d6a03f23747ecdc93ed31e24a66e1 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Thu, 1 Jul 2021 13:43:31 -0400 Subject: [PATCH] Fix LEAP initprofile behavior --- confluent_osdeploy/suse15/profiles/hpc/initprofile.sh | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/confluent_osdeploy/suse15/profiles/hpc/initprofile.sh b/confluent_osdeploy/suse15/profiles/hpc/initprofile.sh index 5d5f4c2b..a9ae3408 100644 --- a/confluent_osdeploy/suse15/profiles/hpc/initprofile.sh +++ b/confluent_osdeploy/suse15/profiles/hpc/initprofile.sh @@ -2,10 +2,13 @@ discnum=$(basename $1) if [ "$discnum" != 1 ]; then exit 0; fi if [ -e $2/boot/kernel ]; then exit 0; fi -if ls $1/Product-* >& /dev/null; then - ln -s $1 $2/product -else - ln -s ${1%1}2 $2/product + +if [[ $profile =~ ^sle.* ]]; then + if ls $1/Product-* >& /dev/null; then + ln -s $1 $2/product + else + ln -s ${1%1}2 $2/product + fi fi sed -i 's/sle 15/SUSE Linux Enterprise 15/; s/opensuse_leap/openSUSE Leap/' $2/profile.yaml ln -s $1/boot/x86_64/loader/linux $2/boot/kernel && \